mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] roywei commented on a change in pull request #15097: [BUGFIX] fix unknown parameter shapes when np_shape is turned on.
Date Sun, 02 Jun 2019 04:52:15 GMT
roywei commented on a change in pull request #15097: [BUGFIX] fix unknown parameter shapes
when np_shape is turned on.
URL: https://github.com/apache/incubator-mxnet/pull/15097#discussion_r289625962
 
 

 ##########
 File path: python/mxnet/gluon/parameter.py
 ##########
 @@ -156,7 +157,12 @@ def grad_req(self, req):
 
     @property
     def shape(self):
-        return self._shape
+        if self._shape is None:
+            return None
+        elif is_np_shape():
+            return tuple(i if i != 0 else -1 for i in self._shape)
 
 Review comment:
   a simple comment about -1

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message