From 763246df9871b1bb29529c40ae9082ec9e50cb6e Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Tue, 26 Sep 2017 23:12:40 +0000 Subject: [PATCH] add RMSpropCentered to model from config --- onn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/onn.py b/onn.py index 37aa304..90a17e3 100755 --- a/onn.py +++ b/onn.py @@ -1034,6 +1034,10 @@ def optim_from_config(config): d2 = config.optim_decay2 if 'optim_decay2' in config else 99.5 mu = np.exp(-1/d2) optim = RMSprop(mu=mu) + elif config.optim == 'rmsc': + d2 = config.optim_decay2 if 'optim_decay2' in config else 9.5 + mu = np.exp(-1/d2) + optim = RMSpropCentered(momentum=mu) elif config.optim == 'sgd': d1 = config.optim_decay1 if 'optim_decay1' in config else 0 clip = config.gradient_clip if 'gradient_clip' in config else 0.0