giuseppedib opened a new issue #15766: [MXNet] Operator _zeros inferring shapes 
failed
URL: https://github.com/apache/incubator-mxnet/issues/15766
 
 
   ## Description
   The definition of a mx.ndarray, with one of the dimensions set to zero, 
produces an error in mxnet v1.5.0, while it was working fine in mxnet v1.4.1 .
   
   ## Environment info
   ```
   ----------Python Info----------
   Version      : 3.7.3
   Compiler     : Clang 4.0.1 (tags/RELEASE_401/final)
   Build        : ('default', 'Mar 27 2019 16:54:48')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 19.2.1
   Directory    : /anaconda3/lib/python3.7/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.5.0
   Directory    : /anaconda3/lib/python3.7/site-packages/mxnet
   Commit Hash   : 75a9e187d00a8b7ebc71412a02ed0e3ae489d91f
   Library      : ['/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so']
   ```
   
   ## Steps to reproduce
   ```
   import mxnet as mx
   p = mx.ndarray.zeros(shape=(3,0))
   ```
   
   ## Error Message:
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/anaconda3/lib/python3.7/site-packages/mxnet/ndarray/utils.py", line 
67, in zeros
       return _zeros_ndarray(shape, ctx, dtype, **kwargs)
     File "/anaconda3/lib/python3.7/site-packages/mxnet/ndarray/ndarray.py", 
line 3885, in zeros
       return _internal._zeros(shape=shape, ctx=ctx, dtype=dtype, **kwargs)
     File "<string>", line 34, in _zeros
     File "/anaconda3/lib/python3.7/site-packages/mxnet/_ctypes/ndarray.py", 
line 92, in _imperative_invoke
       ctypes.byref(out_stypes)))
     File "/anaconda3/lib/python3.7/site-packages/mxnet/base.py", line 253, in 
check_call
       raise MXNetError(py_str(_LIB.MXGetLastError()))
   mxnet.base.MXNetError: [16:54:11] src/imperative/./imperative_utils.h:145: 
Operator _zeros inferring shapes failed.
   input shapes:
   output shapes:
   [3,-1]
   operator attributes:
   dtype : float32
   ctx : cpu(0)
   shape : (3, 0)
   
   Stack trace:
     [bt] (0) 1   libmxnet.so                         0x00000001133fc929 
mxnet::op::NDArrayOpProp::~NDArrayOpProp() + 4473
     [bt] (1) 2   libmxnet.so                         0x000000011497bb1f 
mxnet::imperative::SetShapeType(mxnet::Context const&, nnvm::NodeAttrs const&, 
std::__1::vector<mxnet::NDArray*, std::__1::allocator<mxnet::NDArray*> > 
const&, std::__1::vector<mxnet::NDArray*, std::__1::allocator<mxnet::NDArray*> 
> const&, mxnet::DispatchMode*) + 8767
     [bt] (2) 3   libmxnet.so                         0x000000011497883c 
mxnet::Imperative::Invoke(mxnet::Context const&, nnvm::NodeAttrs const&, 
std::__1::vector<mxnet::NDArray*, std::__1::allocator<mxnet::NDArray*> > 
const&, std::__1::vector<mxnet::NDArray*, std::__1::allocator<mxnet::NDArray*> 
> const&) + 716
     [bt] (3) 4   libmxnet.so                         0x00000001148be48e 
SetNDInputsOutputs(nnvm::Op const*, std::__1::vector<mxnet::NDArray*, 
std::__1::allocator<mxnet::NDArray*> >*, std::__1::vector<mxnet::NDArray*, 
std::__1::allocator<mxnet::NDArray*> >*, int, void* const*, int*, int, int, 
void***) + 1582
     [bt] (4) 5   libmxnet.so                         0x00000001148bf1d0 
MXImperativeInvokeEx + 176
     [bt] (5) 6   libffi.6.dylib                      0x000000010b722884 
ffi_call_unix64 + 76

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