leezu commented on issue #7261: Add grad_req parameter to Block that is passed to ParameterDict.get URL: https://github.com/apache/incubator-mxnet/pull/7261#issuecomment-318992462 Regarding setattr for parameterdict, it should work if we always want to change the attributes of all parameters. I am wondering if there is a case in which the user may want to create a Block, that internally uses (lets say) 2 Blocks but each of them has a different grad_req. In that case, with the API introduced by this PR, the user may add 2 parameters to the init function of his block, and pass the respective one to the Blocks that he uses to compose his block. On the other hand for setattr one could introduce a prefix filter, that sets only the attributes of parameters whose name starts with the given prefix, which would result in the same behaviour. ---------------------------------------------------------------- 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: us...@infra.apache.org
With regards, Apache Git Services