jmerkow commented on issue #9730: Check padding size for global pooling
URL: https://github.com/apache/incubator-mxnet/pull/9730#issuecomment-494238556
 
 
   It worked fine before, it was still sent to the pooling function:
   Here is code from 1.0.0:
   ```
   import mxnet as mx
   
   class Batch(object):
       def __init__(self, data):
           self.data = data
   
       def get_batch_shape(self):
           return tuple(self.data[0].shape)
   
   data = mx.sym.Variable('data')
   gpool = mx.sym.Pooling(data, 
                          name='gpooling', 
                          global_pool=True, 
                          pad=(1,1), pool_type='avg', 
                          kernel=(8,8),)
   mod = mx.mod.Module(gpool, context=mx.gpu(0), label_names=[])
   data = Batch([mx.ndarray.ones((1, 3, 5, 5))])
   mod.bind(for_training=True, force_rebind=True, data_shapes=[('data', 
data.get_batch_shape())],)
   mod.init_params()
   mod.forward(data)
   print(mx.__version__)
   mod.get_outputs()[0].asnumpy()
   ```
   outputs: 
   > [[[[ 0.63999999]] [[ 0.63999999]]  [[ 0.63999999]]]]

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to