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 2019/04/15 19:16:22 UTC

[GitHub] [incubator-mxnet] yuxihu opened a new pull request #14703: Set idx2name for Optimizer object

yuxihu opened a new pull request #14703: Set idx2name for Optimizer object
URL: https://github.com/apache/incubator-mxnet/pull/14703
 
 
   Currently when we use `module.fit()`, we can pass a str or an Optimizer object as the [optimizer](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/module/base_module.py#L440). When we pass an Optimizer object that is created outside before calling `module.fit()`, we are not checking and setting `optimizer.idx2name` which is used to mask out entries in update for weight decay in [module.init_optimizer](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/module/module.py#L522) method. If `idx2name` is not set when creating the optimizer object outside, it can impact the convergence behavior as weight decay is applied to all parameters in this case.
   
   This PR checks if `idx2name` is set if an Optimizer object is given. If not, we are setting it to the proper values.
   
   

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