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:
authorkarpathy <andrej.karpathy@gmail.com>2015-04-16 21:53:21 +0300
committerkarpathy <andrej.karpathy@gmail.com>2015-04-16 21:53:21 +0300
commit3d1d03d5bc22f7113c22e5dfdb12e3fa06a1fb18 (patch)
treeb3a02f7480b75e1272858220ebcb76f461181068
parentf25684174a6101f3b4521e74bd0718ebd848c5cd (diff)
incorporating suggestion from @koraykv and avoiding an extra copy
-rw-r--r--rmsprop.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/rmsprop.lua b/rmsprop.lua
index bf771e9..6a84416 100644
--- a/rmsprop.lua
+++ b/rmsprop.lua
@@ -38,7 +38,7 @@ function optim.rmsprop(opfunc, x, config, state)
state.m:addcmul(1.0-alpha,dfdx,dfdx)
-- (4) perform update
- state.tmp:copy(state.m):sqrt()
+ state.tmp:sqrt(state.m)
x:addcdiv(-lr, dfdx, state.tmp:add(epsilon))
-- return x*, f(x) before optimization