barry-jin commented 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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to