diff options
author | txh18 <[email protected]> | 2015-12-10 23:13:29 +0800 |
---|---|---|
committer | txh18 <[email protected]> | 2015-12-10 23:13:29 +0800 |
commit | 7fd5c2c8672c8ac75348e2d51f56a72b5fd21b7b (patch) | |
tree | 00f1d46842a203b3af886708308193d677bce3eb | |
parent | 217c7f5b5c5193cfc7db20b2ee25fc66c54569b6 (diff) |
...
-rw-r--r-- | nerv/examples/lmptb/bilstmlm_ptb_main.lua | 6 | ||||
-rw-r--r-- | nerv/examples/lmptb/lstmlm_ptb_main.lua | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/nerv/examples/lmptb/bilstmlm_ptb_main.lua b/nerv/examples/lmptb/bilstmlm_ptb_main.lua index 0472588..e88eea2 100644 --- a/nerv/examples/lmptb/bilstmlm_ptb_main.lua +++ b/nerv/examples/lmptb/bilstmlm_ptb_main.lua @@ -345,7 +345,7 @@ end lr_half = false --can not be local, to be set by loadstring start_iter = -1 -start_lr = global_conf.lrate +start_lr = nil ppl_last = 100000 commands_str = "train:test" commands = {} @@ -371,7 +371,9 @@ global_conf.log_fn = global_conf.work_dir .. '/log_lstm_tnn_' .. commands_str .. global_conf.log_fn, _ = string.gsub(global_conf.log_fn, ':', '-') commands = nerv.SUtil.parse_commands_set(commands_str) -global_conf.lrate = start_lr --starting lr can be set by user(arg[2]) +if start_lr ~= nil then + global_conf.lrate = start_lr --starting lr can be set by user(arg[2]) +end nerv.printf("%s creating work_dir(%s)...\n", global_conf.sche_log_pre, global_conf.work_dir) nerv.LMUtil.wait(2) diff --git a/nerv/examples/lmptb/lstmlm_ptb_main.lua b/nerv/examples/lmptb/lstmlm_ptb_main.lua index 6e3fab9..9bdd5ff 100644 --- a/nerv/examples/lmptb/lstmlm_ptb_main.lua +++ b/nerv/examples/lmptb/lstmlm_ptb_main.lua @@ -333,7 +333,7 @@ end lr_half = false --can not be local, to be set by loadstring start_iter = -1 -start_lr = global_conf.lrate +start_lr = nil ppl_last = 100000 commands_str = "train:test" commands = {} @@ -358,7 +358,9 @@ global_conf.log_fn = global_conf.work_dir .. '/log_lstm_tnn_' .. commands_str .. global_conf.log_fn, _ = string.gsub(global_conf.log_fn, ':', '-') commands = nerv.SUtil.parse_commands_set(commands_str) -global_conf.lrate = start_lr +if start_lr ~= nil then + global_conf.lrate = start_lr +end nerv.printf("%s creating work_dir(%s)...\n", global_conf.sche_log_pre, global_conf.work_dir) nerv.LMUtil.wait(2) |