You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/11/06 14:17:08 UTC

[GitHub] fmcarlucci opened a new issue #8560: Upsampling: lack of arguments crash the kernel

fmcarlucci opened a new issue #8560: Upsampling: lack of arguments crash the kernel
URL: https://github.com/apache/incubator-mxnet/issues/8560
 
 
   Python 2.7, mxnet v '0.11.0'
   
   Very simply, if sym.UpSampling is not called with the appropriate parameters, MxNet crashes without meaningful error messages.
   
   This will crash:
   `mx.sym.UpSampling(data=body, scale=4, sample_type='bilinear', workspace=workspace)`
   
   But this is fine:
   `mx.sym.UpSampling(data=body, scale=4, num_filter=3, sample_type='bilinear', workspace=workspace)`
   
   Difference being that I added the num_filter argument 
   
   
   A full network example
   
   ```
   data = mx.sym.Variable(name='data')
   body = mx.sym.BatchNorm(data=data, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='deco_bn_data')
   body = mx.sym.Convolution(data=body, num_filter=64, kernel=(7, 7), stride=(2,2), pad=(3, 3), 
                             no_bias=True, name="deco_conv0", workspace=workspace)
   body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='deco_bn0')
   body = mx.sym.LeakyReLU(data=body, act_type="leaky", slope=0.02, name='deco_lrelu0')
   body = mx.sym.Pooling(data=body, kernel=(3, 3), stride=(2,2), pad=(1,1), pool_type='max', name='deco_pooling')
   body = mx.sym.Convolution(data=body, num_filter=3, kernel=(1, 1), stride=(1,1), pad=(0, 0), 
                             no_bias=True, name="deco_toRGB", workspace=workspace)
   body = mx.sym.UpSampling(data=body, scale=4, num_filter=3, sample_type='bilinear', workspace=workspace)
   test_net = mx.sym.Convolution(data=body, num_filter=1, kernel=(4, 4), stride=(3,3), pad=(0, 0))
   test_net = mx.symbol.FullyConnected(data=test_net, num_hidden=10, name='fc1')
   test_net = mx.symbol.SoftmaxOutput(data=test_net, name='softmax')
   ```

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


With regards,
Apache Git Services