access2rohit commented on a change in pull request #16885: Multi Precision Lamb
Update operator
URL: https://github.com/apache/incubator-mxnet/pull/16885#discussion_r352874685
##########
File path: python/mxnet/optimizer/optimizer.py
##########
@@ -1262,34 +1263,73 @@ def __init__(self, learning_rate=0.001, beta1=0.9,
beta2=0.999, epsilon=1e-6,
def create_state(self, index, weight):
stype = weight.stype
- dtype = weight.dtype
- return (zeros(weight.shape, weight.context, dtype=dtype, stype=stype),
- zeros(weight.shape, weight.context, dtype=dtype, stype=stype))
+ return (zeros(weight.shape, weight.context, dtype=numpy.float32,
stype=stype),
+ zeros(weight.shape, weight.context, dtype=numpy.float32,
stype=stype))
+
+ def _update_impl(self, indices, weights, grads, states,
multi_precision=False):
+ aggregate = True
Review comment:
Done
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services