diff options
author | Qi Liu <[email protected]> | 2016-03-31 16:56:26 +0800 |
---|---|---|
committer | Qi Liu <[email protected]> | 2016-03-31 16:56:26 +0800 |
commit | c5d07f0fc076d6cece255cf2372df9ef7c63126b (patch) | |
tree | 6ddad92310def434d37e44236d87e4aeebb79476 | |
parent | 78643f5127d86b54894f46a64d9593cdf6048d51 (diff) |
change ptb example
-rw-r--r-- | nerv/examples/ptb/main.lua | 6 | ||||
-rw-r--r-- | nerv/examples/ptb/reader.lua | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nerv/examples/ptb/main.lua b/nerv/examples/ptb/main.lua index 688716b..5d1a326 100644 --- a/nerv/examples/ptb/main.lua +++ b/nerv/examples/ptb/main.lua @@ -2,13 +2,13 @@ nerv.include('reader.lua') nerv.include('select_linear.lua') gconf = { - chunk_size = 5, + chunk_size = 15, dropout_rate = 0, lrate = 1.5, wcost = 1e-5, - max_iter = 3, + max_iter = 35, clip = 5, - momentum = 0, + momentum = 0.9, batch_size = 200, test = true, } diff --git a/nerv/examples/ptb/reader.lua b/nerv/examples/ptb/reader.lua index 70c0c97..76a78cf 100644 --- a/nerv/examples/ptb/reader.lua +++ b/nerv/examples/ptb/reader.lua @@ -32,8 +32,8 @@ end function Reader:get_seq(input_file) local f = io.open(input_file, 'r') self.seq = {} - -- while true do - for i = 1, 26 do + while true do + -- for i = 1, 26 do local seq = f:read() if seq == nil then break |