aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortxh18 <[email protected]>2015-11-13 17:10:45 +0800
committertxh18 <[email protected]>2015-11-13 17:10:45 +0800
commita4aa388f4505386fca20431e69b5bdfdd7e9f07b (patch)
tree1e02178984c02682eb3d203fc32b7c037b8181d3
parentbf58cc0cf54135eb17e897ab666d04060b6bdfcf (diff)
added random seed
-rw-r--r--nerv/examples/lmptb/tnn_ptb_main.lua4
1 files changed, 3 insertions, 1 deletions
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)