From f592e424cc8f0d117b732543f6823b708071a89a Mon Sep 17 00:00:00 2001 From: txh18 Date: Mon, 11 Jan 2016 19:05:24 +0800 Subject: added wordprob into gru_ptb_main.lua --- nerv/examples/lmptb/grulm_ptb_main.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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"] -- cgit v1.2.3