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/27 08:07:08 UTC

[GitHub] kobenaxie opened a new issue #8827: Question about mx.nd.split() ?

kobenaxie opened a new issue #8827: Question about mx.nd.split() ?
URL: https://github.com/apache/incubator-mxnet/issues/8827
 
 
   `mxnet 0.12.0`
   
   when the size of data in the split axis is 1, it will return incorrect result. For example,
   
   `In [1]: import mxnet as mx
   
   In [2]: data = mx.nd.ones((2,3,4))
   
   In [3]: data_s = mx.nd.split(data, axis=1, num_outputs=data.shape[1], squeeze_axis=False)
   
   In [4]: len(data_s)
   Out[4]: 3
   
   In [5]: data_s[0].shape
   Out[5]: (2L, 1L, 4L)
   
   **but, when splitting x along axis=1 below, it will return 2 NDArray.**
   In [6]: x = data_s[0] #with shape  (2L, 1L, 4L)
   
   In [8]: x_s = mx.nd.split(x, axis=1, num_outputs=x.shape[1], squeeze_axis=False)
   
   In [9]: len(x_s)
   Out[9]: 2
   
   In [10]: x_s[0].shape
   Out[10]: (1L, 4L)
   `
   Is it a bug ?

----------------------------------------------------------------
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