fix MomentumClip with nesterov enabled

This commit is contained in:
Connor Olding 2017-07-22 04:58:31 +00:00
parent be1795f6ed
commit b20a34c2de

2
onn.py
View file

@ -177,7 +177,7 @@ class MomentumClip(Optimizer):
self.accum[:] = self.accum * self.mu + dW
if self.nesterov:
return -self.lr * dW * self.lr + self.accum * self.mu
return -self.lr * (self.accum * self.mu + dW)
else:
return -self.lr * self.accum