From a4aa388f4505386fca20431e69b5bdfdd7e9f07b Mon Sep 17 00:00:00 2001 From: txh18 Date: Fri, 13 Nov 2015 17:10:45 +0800 Subject: added random seed --- nerv/examples/lmptb/tnn_ptb_main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nerv/examples/lmptb/tnn_ptb_main.lua b/nerv/examples/lmptb/tnn_ptb_main.lua index f978247..3e5ab2d 100644 --- a/nerv/examples/lmptb/tnn_ptb_main.lua +++ b/nerv/examples/lmptb/tnn_ptb_main.lua @@ -157,7 +157,7 @@ local set = arg[1] --"test" if (set == "ptb") then data_dir = '/home/slhome/txh18/workspace/nerv/nerv/nerv/examples/lmptb/PTBdata' -train_fn = data_dir .. '/ptb.valid.txt.adds' +train_fn = data_dir .. '/ptb.train.txt.adds' valid_fn = data_dir .. '/ptb.valid.txt.adds' test_fn = data_dir .. '/ptb.test.txt.adds' vocab_fn = data_dir .. '/vocab' @@ -243,6 +243,8 @@ printf("%s printing training scheduling end.\n", global_conf.sche_log_pre) nerv.LMUtil.wait(2) ------------------printing options end------------------------------ +math.randomseed(1) + printf("%s creating work_dir...\n", global_conf.sche_log_pre) os.execute("mkdir -p "..global_conf.work_dir) os.execute("cp " .. global_conf.train_fn .. " " .. global_conf.train_fn_shuf) -- cgit v1.2.3-70-g09d2