You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/08/01 01:12:54 UTC

[GitHub] leezu commented on a change in pull request #7261: Add grad_req parameter to Block that is passed to ParameterDict.get

leezu commented on a change in pull request #7261: Add grad_req parameter to Block that is passed to ParameterDict.get
URL: https://github.com/apache/incubator-mxnet/pull/7261#discussion_r130500156
 
 

 ##########
 File path: python/mxnet/gluon/parameter.py
 ##########
 @@ -374,6 +374,15 @@ def __repr__(self):
                         content='\n'.join([_indent('  {0}'.format(v), 2)
                                            for v in self.values()]))
 
+    def setattr(self, attr, value, prefix=""):
+        """Sets p.attr = value for all params p if their name starts with prefix.
+
+        Can be useful to change the grad_req attribute of a set of parameters.
 
 Review comment:
   I have added the documentation. Please let me know if you see any issues.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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