Commit ac74f345 authored by Simon Layton's avatar Simon Layton
Browse files

Fix momentum in non-nesterov case

parent 6d6f0bc2
...@@ -104,6 +104,8 @@ struct SGDFunctor ...@@ -104,6 +104,8 @@ struct SGDFunctor
if (nesterov) { if (nesterov) {
incoming_grads[ii] += momentum * incoming_moms[ii]; incoming_grads[ii] += momentum * incoming_moms[ii];
} else {
incoming_grads[ii] = incoming_moms[ii];
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment