haojin2 commented on a change in pull request #17328: [numpy] add op pad
URL: https://github.com/apache/incubator-mxnet/pull/17328#discussion_r380465021
##########
File path: tests/python/unittest/test_numpy_op.py
##########
@@ -6787,6 +6787,63 @@ def hybrid_forward(self,F,a):
assert_almost_equal(mx_out.asnumpy(), np_out, rtol=rtol, atol=atol)
+@with_seed()
+@use_np
+def test_np_pad():
+ class TestPad(HybridBlock):
+ def __init__(self, pad_width, mode='constant'):
+ super(TestPad,self).__init__()
+ self._pad_width = pad_width
+ self._mode = mode
+ def hybrid_forward(self,F,A,**kwargs):
+ return F.np.pad(A, self._pad_width, mode=self._mode, **kwargs)
Review comment:
better add an extra blank line below.
----------------------------------------------------------------
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