aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortxh18 <[email protected]>2016-01-11 19:05:24 +0800
committertxh18 <[email protected]>2016-01-11 19:05:24 +0800
commitf592e424cc8f0d117b732543f6823b708071a89a (patch)
tree3c86a33a9d1a46630731836d87abbe29a32bbbeb
parent38d7b02e9f5f5568ef6c7d1481eee190cb74eebc (diff)
added wordprob into gru_ptb_main.lua
-rw-r--r--nerv/examples/lmptb/grulm_ptb_main.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/nerv/examples/lmptb/grulm_ptb_main.lua b/nerv/examples/lmptb/grulm_ptb_main.lua
index fc36a92..a845950 100644
--- a/nerv/examples/lmptb/grulm_ptb_main.lua
+++ b/nerv/examples/lmptb/grulm_ptb_main.lua
@@ -501,4 +501,17 @@ if commands["testout"] == 1 then
{["one_sen_report"] = true}) --false update!
end --if commands["testout"]
+if commands["wordprob"] == 1 then
+ if final_iter ~= -1 and test_iter == -1 then
+ test_iter = final_iter
+ end
+ if test_iter == -1 then
+ test_iter = "final"
+ end
+
+ printf("===WORD PROB===\n")
+ global_conf.sche_log_pre = "[SCHEDULER FINAL_TEST]:"
+ tnn = load_net(global_conf, test_iter)
+ LMTrainer.lm_process_file_rnn(global_conf, global_conf.test_fn, tnn, false, {["word_prob_report"] = true}) --false update!
+end --if commands["wordprob"]