Does mxnet have the operation of implementing dropblock?
Similar to how it is implemented in TF, you can implement this in MXNet using a combination of binomial sampling and maxpool.
mask = 1 - nd.Pooling(nd.random.multinomial(nd.array([1.0-gamma, gamma]), (1, 1, h, w)).astype('float32'), kernel=(block_size, block_size), pool_type='max', pad=(block_size//2, block_size//2))
Let me know if you are looking for a gluon
HybridBlock implementation and I can help you with that.
ok,thanks for your suggesion, I am trying to make a python layer of dropblok.
What’s a python layer? Are you using Gluon API?
Something like this?
Are you using Gluon? if so, you shouldn’t need to write a custom op. You can instead write your own custom gluon HybridBlock. Otherwise for custom op you’d have to implement both
Hello, a few moments later… haha
Do you know an implementation with Gluon and HybridBlock? Especially how do you specify if it is training or test mode?