add RMSpropCentered to model from config
This commit is contained in:
parent
9bb26b1ec5
commit
763246df98
1 changed files with 4 additions and 0 deletions
4
onn.py
4
onn.py
|
@ -1034,6 +1034,10 @@ def optim_from_config(config):
|
||||||
d2 = config.optim_decay2 if 'optim_decay2' in config else 99.5
|
d2 = config.optim_decay2 if 'optim_decay2' in config else 99.5
|
||||||
mu = np.exp(-1/d2)
|
mu = np.exp(-1/d2)
|
||||||
optim = RMSprop(mu=mu)
|
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':
|
elif config.optim == 'sgd':
|
||||||
d1 = config.optim_decay1 if 'optim_decay1' in config else 0
|
d1 = config.optim_decay1 if 'optim_decay1' in config else 0
|
||||||
clip = config.gradient_clip if 'gradient_clip' in config else 0.0
|
clip = config.gradient_clip if 'gradient_clip' in config else 0.0
|
||||||
|
|
Loading…
Reference in a new issue