drivanov commented on a change in pull request #16398: Aggregated adamw update
URL: https://github.com/apache/incubator-mxnet/pull/16398#discussion_r332767272
##########
File path: python/mxnet/ndarray/contrib.py
##########
@@ -542,14 +545,17 @@ def isnan(data):
[1. 0.]
<NDArray 2 @cpu(0)>
"""
- return data != data # pylint: disable=comparison-with-itself
+ return data != data # pylint: disable=comparison-with-itself
-def adamw_update(weight, grad, mean, var, rescale_grad, lr, eta, beta1=0.9,
beta2=0.999,
- epsilon=1e-8, wd=0, clip_gradient=-1, out=None, name=None,
**kwargs):
+def getRescaleGrad(rescale_grad, ctx):
Review comment:
Copy is always skipped when `rescale_grad` is defined in a proper context:
```
def as_in_context(self, context):
if self.context == context:
return self
return self.copyto(context)
```
----------------------------------------------------------------
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