From c5d07f0fc076d6cece255cf2372df9ef7c63126b Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Thu, 31 Mar 2016 16:56:26 +0800 Subject: change ptb example --- nerv/examples/ptb/main.lua | 6 +++--- 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 -- cgit v1.2.3-70-g09d2