Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/optim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjay Talati <ajaytalati@googlemail.com>2015-03-06 10:43:31 +0300
committerAjay Talati <ajaytalati@googlemail.com>2015-03-06 10:43:31 +0300
commit3c816a07bf95b91c4e597e836938df4e3e76504e (patch)
tree3efb981339ca3c4baf1611fdca882e13f9439802 /adam.lua
parent66601bc1efd19b87d2a29b6f3d7916e8052754e7 (diff)
Update adam.lua
Diffstat (limited to 'adam.lua')
-rw-r--r--adam.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/adam.lua b/adam.lua
index 6aa3e56..c1545db 100644
--- a/adam.lua
+++ b/adam.lua
@@ -47,7 +47,7 @@ function optim.adam(opfunc, x, config, state)
-- Decay the first moment running average coefficient
local bt1 = 1 - beta1 * lambda^(state.t - 1)
- state.m:mul(bt1):add(bt1, dfdx)
+ state.m:mul(bt1):add(1-bt1, dfdx)
state.v:mul(beta2):addcmul(1-beta2, dfdx, dfdx)
state.denom:copy(state.v):sqrt():add(epsilon)