You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/06 01:21:58 UTC

[GitHub] tornadomeet commented on issue #9323: support setattr of some specified paramter of ParameterDict

tornadomeet commented on issue #9323: support setattr of some specified paramter of ParameterDict
URL: https://github.com/apache/incubator-mxnet/pull/9323#issuecomment-355711646
 
 
   @piiswrong if we only set one attr, then we need some code like this(not concise):  
   ```python
   all_params = net.collect_params()
   fixed_params = [###]
   for k, v in all_params.items():
       if k in all_params.keys():
          setattr(v, 'grad_req', 'null')
   ```
   
   furthermore, if we need set others attrs in the same project, such as change `lr_mult`, `wd_mult`, we need this code again, of course we can write a function to do this, but in that case why not just support this function in gluon api for better experience.

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