The gradient is accumulated, so there is no need to take multiple steps.

This commit is contained in:
Ryan Curtin
2017-10-04 21:34:58 -04:00
parent 28631e415b
commit d0d1e59fbb
+1 -2
View File
@@ -110,8 +110,7 @@ double SGD<UpdatePolicyType>::Optimize(
function.Gradient(iterate, currentFunction, gradient, effectiveBatchSize);
// Use the update policy to take a step.
for (size_t k = 0; k < effectiveBatchSize; ++k) // hack...
updatePolicy.Update(iterate, stepSize, gradient);
updatePolicy.Update(iterate, stepSize, gradient);
overallObjective += function.Evaluate(iterate, currentFunction,
effectiveBatchSize);