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:
authorSoumith Chintala <soumith@gmail.com>2014-07-08 18:24:40 +0400
committerSoumith Chintala <soumith@gmail.com>2014-07-08 18:24:40 +0400
commit5b6cd7bae71d9f233a4fe0f28edfd1f5acb5e7e9 (patch)
treef63e7817c4ba885ea31d33d601c5f448a39057e4 /adagrad.lua
parent2e4c5d55a9cc0a6e2a8cd0f090133839792d75ab (diff)
cutorch compatibility for adagrad
Diffstat (limited to 'adagrad.lua')
-rw-r--r--adagrad.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/adagrad.lua b/adagrad.lua
index b23715c..6c73abd 100644
--- a/adagrad.lua
+++ b/adagrad.lua
@@ -38,7 +38,7 @@ function optim.adagrad(opfunc, x, config, state)
state.paramStd = torch.Tensor():typeAs(x):resizeAs(dfdx)
end
state.paramVariance:addcmul(1,dfdx,dfdx)
- torch.sqrt(state.paramStd,state.paramVariance)
+ state.paramStd:resizeAs(state.paramVariance):copy(state.paramVariance):sqrt()
x:addcdiv(-clr, dfdx,state.paramStd:add(1e-10))
-- (5) update evaluation counter