From 359cc5ac02af22ab409f1b50432ba73218b0b77e Mon Sep 17 00:00:00 2001 From: Amir Arsalan Soltani Date: Sun, 19 Feb 2017 17:19:05 -0500 Subject: [PATCH] Update adam.lua Avoid unnecessary memory overhead when the user doesn't explicitly asks to use the state table --- adam.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adam.lua b/adam.lua index bc80b5e..863e1e5 100644 --- a/adam.lua +++ b/adam.lua @@ -24,7 +24,7 @@ RETURN: function optim.adam(opfunc, x, config, state) -- (0) get/update state local config = config or {} - local state = state or config + local state = state or {} local lr = config.learningRate or 0.001 local lrd = config.learningRateDecay or 0