Skip to content

Commit

Permalink
some update
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxin2012 committed Jul 13, 2020
1 parent 9df3124 commit 03a3a97
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Adam[@specialized(Float, Double) T: ClassTag](
val beta1 = this.beta_1
val beta2 = this.beta_2
val eps = this.epsilon
val wd = this.wDecay

val (fx, dfdx) = feval(parameter)
val state = SGDRef.getstate(this)
Expand All @@ -81,8 +82,8 @@ class Adam[@specialized(Float, Double) T: ClassTag](

val clr = - this.schedule.currentRate

if(wDecay > 0) {
dfdx.add(parameter * (ev.fromType(wDecay)))
if(wd > 0) {
dfdx.add(parameter * (ev.fromType(wd)))
}

/**
Expand Down

0 comments on commit 03a3a97

Please sign in to comment.