def nesterov_momentum(loss_or_grads, params, learning_rate, momentum=0.9):
 updates = sgd(loss_or_grads, params, learning_rate)
 return apply_nesterov_momentum(updates, momentum=momentum)

def nesterov_momentum ( loss_or_grads , params , learning_rate , momentum = 0.9 ) : updates = sgd ( loss_or_grads , params , learning_rate ) return apply_nesterov_momentum ( updates , momentum = momentum )
stochastic gradient descent updates with nesterov momentum generates update expressions of the form: * velocity := momentum * velocity - learning_rate * gradient * param := param + momentum * velocity - learning_rate * gradient parameters loss_or_grads : symbolic expression or list of expressions a scalar loss expression .