abhinavs95 commented on a change in pull request #15150: Fix dumps for Constant
initializer
URL: https://github.com/apache/incubator-mxnet/pull/15150#discussion_r291726262
##########
File path: tests/python/unittest/test_init.py
##########
@@ -67,10 +67,23 @@ def test_bilinear_init():
bili_1d = np.array([[1/float(4), 3/float(4), 3/float(4), 1/float(4)]])
bili_2d = bili_1d * np.transpose(bili_1d)
assert (bili_2d == bili_weight.asnumpy()).all()
-
+
+def test_const_init_dumps():
+ # test NDArray input
+ init = mx.init.Constant(mx.nd.ones(5))
Review comment:
Added randomized shape and dimension for the array in test, it can take
values between 1 and 10 with 1D to 5D shapes.
----------------------------------------------------------------
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