fix MomentumClip with nesterov enabled
This commit is contained in:
parent
be1795f6ed
commit
b20a34c2de
1 changed files with 1 additions and 1 deletions
2
onn.py
2
onn.py
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue