anirudhacharya commented on a change in pull request #15150: Fix dumps for 
Constant initializer
URL: https://github.com/apache/incubator-mxnet/pull/15150#discussion_r291736346
 
 

 ##########
 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:
   `test_rsp_const_init` does the following -
   
https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_init.py#L52-L57
   
   The reason I am asking this change is because I think that will be a more 
comprehensive test and will check the whole flow, and it will test the 
initializer the way it will actually be used in production. This change should 
enable serializing and deserializing an `ndarray` object. 
   
   Just check once with a committer who will merge this code. Everything else 
LGTM.

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