eric-haibin-lin opened a new issue #17267: Unclear error message in np.dstack 
URL: https://github.com/apache/incubator-mxnet/issues/17267
 
 
   ## Description
   `mxnet.np.dstack` throws dtype mismatch if one input is `int32` and the 
other is `float32`.  However, the error message is not that clear: 
   ```
   mxnet.base.MXNetError: [18:18:56] 
/generic-flavor/src/src/operator/nn/concat.cc:152: Check failed: i == dtype || 
i == -1: Non-uniform data type in Concat
   Stack trace:
     /lib/libmxnet.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x24) 
[0x7f776418f5a4]
     /lib/libmxnet.so(+0x3523b10) [0x7f77664b4b10]
     /lib/libmxnet.so(mxnet::imperative::SetShapeType(mxnet::Context const&, 
nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, 
std::allocator<mxnet::NDArray*> > const&, std::vector<mxnet::NDArray*, 
std::allocator<mxnet::NDArray*> > const&, mxnet::DispatchMode*)+0x46d) 
[0x7f776600f8ed]
     /lib/libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&, 
nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, 
std::allocator<mxnet::NDArray*> > const&, std::vector<mxnet::NDArray*, 
std::allocator<mxnet::NDArray*> > const&)+0x297) [0x7f7766005137]
     /lib/libmxnet.so(MXImperativeInvokeImpl(void*, int, void**, int*, void***, 
int, char const**, char const**)+0x5e5) [0x7f7765f11a05]
     /lib/libmxnet.so(MXImperativeInvokeEx+0x67) [0x7f7765f12d97]
     
/python3.6/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c)
 [0x7f778ecbcef8]
     
/python3.6/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(ffi_call+0x15f)
 [0x7f778ecbbfff]
     
/python3.6/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(_ctypes_callproc+0x292)
 [0x7f778ecb3e02]
   
   ```
   
   When this op is use in a nested gluon block, it's a bit hard to investigate 
what are the actual types of input 0 and input 1. It will be much more helpful 
if the actual data types can be printed. 

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