v = -p.data.clone() This uses the value of the parameter. It should be the update direction of the given optimizer.
v = -p.data.clone()
This uses the value of the parameter. It should be the update direction of the given optimizer.