Update rule fixed

This commit is contained in:
tejank10 2018-04-04 15:18:44 +05:30
parent ea9b5471fa
commit 3ead662987

View File

@ -81,7 +81,7 @@ function nadam(p::Param; η::Real = 0.001, β1::Real = 0.9, β2::Real = 0.999,
function ()
@. mt = β1 * mt + (1 - β1) * p.Δ
@. vt = β2 * vt + (1 - β2) * p.Δ^2
@. p.Δ = (β1 * mt + (1 - β1) * p.Δ) / (1 - β1p) / ((vt / (1 - β2p)) + ϵ) * η
@. p.Δ = (β1 * mt / (1 - β1 * β1p) + (1 - β1) * p.Δ / (1 - β1p)) / (vt * β2 / (1 - β2p) + ϵ) * η
β1p *= β1
β2p *= β2
end