aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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