These two operations compose independently: callers choose the arithmetic
and the source of the gradient. The accumulation state is persistent, and
applying the parameter update consumes the newly accumulated value.
11def accumulateScaledGradient =
12 (lambda erased value : Type 0 .
13 (lambda unrestricted add : (pi unrestricted left : value . (pi unrestricted right : value . value)) .
14 (lambda unrestricted multiply : (pi unrestricted left : value . (pi unrestricted right : value . value)) .
15 (lambda unrestricted decay : value .
16 (lambda unrestricted previous : value .
17 (lambda unrestricted gradient : value . (add (multiply decay previous) gradient)))))))The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.