{ }
Update relevant entries in 'var' and 'accum' according to the momentum scheme.
tf.raw_ops.SparseApplyMomentum(
var,
accum,
lr,
grad,
indices,
momentum,
use_locking=False,
use_nesterov=False,
name=None
)
Set use_nesterov = True if you want to use Nesterov momentum.
That is for rows we have grad for, we update var and accum as follows:
\[accum = accum * momentum + grad\]
\[var -= lr * accum\]
Returns | |
---|---|
A mutable Tensor . Has the same type as var .
|