aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2016-04-04 01:20:13 +0800
committerDeterminant <ted.sybil@gmail.com>2016-04-04 01:20:13 +0800
commit811dd6cb2a25f493d73a29d5f44ba6a295de5a7b (patch)
treee7a7e046e083e4713fa8be289cd9fe4d1c1b7698
parent89d57b6fae6bcb0195a73fb97ab6870ee0d0ce20 (diff)
minor changes in asr_trainer.lua
-rw-r--r--nerv/examples/asr_trainer.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/nerv/examples/asr_trainer.lua b/nerv/examples/asr_trainer.lua
index 9a764fc..40da022 100644
--- a/nerv/examples/asr_trainer.lua
+++ b/nerv/examples/asr_trainer.lua
@@ -282,6 +282,7 @@ for i = gconf.cur_iter, gconf.max_iter do
nerv.info("rejecting the trained params, rollback to the previous one")
file.move(param_fname, param_fname .. ".rejected")
rebind_param_repo = pr_prev
+ gconf.do_halving = true
break -- `continue` equivalent
else
nerv.info("accepting the trained params")
@@ -301,10 +302,10 @@ for i = gconf.cur_iter, gconf.max_iter do
elseif not gconf.keep_halving then
gconf.do_halving = false
end
- if gconf.do_halving then
- gconf.lrate = gconf.lrate * gconf.halving_factor
- end
until true
+ if gconf.do_halving then
+ gconf.lrate = gconf.lrate * gconf.halving_factor
+ end
if stop then break end
-- nerv.Matrix.print_profile()
end