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 2019/06/19 13:54:47 UTC

[GitHub] [incubator-mxnet] TaoLv edited a comment on issue #15267: Java examples broken with mxnet mkldnn build

TaoLv edited a comment on issue #15267: Java examples broken with mxnet mkldnn build
URL: https://github.com/apache/incubator-mxnet/issues/15267#issuecomment-503568119
 
 
   @arcadiaphy @pengzhao-intel This issue is root caused. The flatten layer before slice is not properly handled. It can be reproduced as below. We already have a fix in local and will submit a PR soon. Do you think we should have the fix into 1.5.0 release?
   ```python
   import mxnet as mx
   import numpy as np
   from mxnet import Context
   
   np.random.seed(12345)
   
   data = mx.symbol.Variable('data')
   weight = mx.symbol.Variable('weight')
   bias = mx.symbol.Variable('bias')
   conv1= mx.symbol.Convolution(data = data, weight=weight, bias=bias, name='conv1', num_filter=64, kernel=(3,3), stride=(1,1))
   flatten1 = mx.symbol.flatten(data = conv1)
   slice1 = mx.symbol.slice(data = flatten1, begin=0, end=1)
   
   shape = (2, 16, 224, 224)
   val = np.random.rand(2, 16, 224, 224).astype(np.float32)
   exe = slice1.simple_bind(Context.default_ctx, data=shape)
   exe.arg_arrays[0][:] = val
   exe.arg_arrays[1][:] = np.random.normal(size=exe.arg_arrays[1].shape)
   p = exe.forward(is_train=False)
   p[0].wait_to_read()
   print(p[0])
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services