You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/01/22 18:59:14 UTC

[GitHub] [incubator-mxnet] barry-jin edited a comment on issue #19777: np.pad() fails even with simple arguments

barry-jin edited a comment on issue #19777:
URL: https://github.com/apache/incubator-mxnet/issues/19777#issuecomment-765618250


   Thanks for reporting this bug. The root cause is that `pad` operator tries to cast Integer type into ADT type in this line 
   https://github.com/apache/incubator-mxnet/blob/1c3fcad78caa7e58f81045d6128435a59222dfdd/src/api/operator/numpy/np_pad_op.cc#L65
   From my perspective, it's the bug in the design of `pad` operator on C++ side. Investigated into `pad` source, the attribute `pad_width` only accepts a tuple of tuples as input rather than a tuple of integers or only integer. So, we may need to add more conditions in [`_npi.pad`](https://github.com/apache/incubator-mxnet/blob/master/src/api/operator/numpy/np_pad_op.cc) to check `pad_with` type to fix this bug. 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org