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

 ##########
 File path: python/mxnet/initializer.py
 ##########
 @@ -464,6 +464,11 @@ def __init__(self, value):
     def _init_weight(self, _, arr):
         arr[:] = self.value
 
+    def dumps(self):
+        if not np.isscalar(self._kwargs['value']):
+            self._kwargs['value'] = self._kwargs['value'].asnumpy().tolist()
 
 Review comment:
   Fixed!

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