Skip to content
Snippets Groups Projects
Commit 8aee1182 authored by shivaram's avatar shivaram
Browse files

Merge pull request #748 from atalwalkar/master

made SimpleUpdater consistent with other updaters
parents 49be084e e4387ddf
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,8 @@ abstract class Updater extends Serializable {
class SimpleUpdater extends Updater {
override def compute(weightsOld: DoubleMatrix, gradient: DoubleMatrix,
stepSize: Double, iter: Int, regParam: Double): (DoubleMatrix, Double) = {
val normGradient = gradient.mul(stepSize / math.sqrt(iter))
val thisIterStepSize = stepSize / math.sqrt(iter)
val normGradient = gradient.mul(thisIterStepSize)
(weightsOld.sub(normGradient), 0)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment