anirudhacharya commented on a change in pull request #16053: Fixes #15543
URL: https://github.com/apache/incubator-mxnet/pull/16053#discussion_r321256928
 
 

 ##########
 File path: tests/python/unittest/test_optimizer.py
 ##########
 @@ -396,6 +397,7 @@ def update(self, index, weight, grad, state):
                 weight32[:] += -lr * (grad32 + wd * weight32)
             else:
                 weight32[:] += (self.momentum**2 * mom) - 
lr*(self.momentum+1)*(grad32 + wd*weight32)
+                mom = (self.momentum*mom) - lr*(grad32 + wd*weight32)
 
 Review comment:
   the sgd unit test also has `lr` as part of `mom` update - 
https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_optimizer.py#L142.
 
   
   let me know if you still think this needs to change.

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


With regards,
Apache Git Services

Reply via email to