aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimmon Zhuang <[email protected]>2015-10-10 19:06:53 +0800
committerYimmon Zhuang <[email protected]>2015-10-10 19:06:53 +0800
commit60e7718f4db981557ac48d9d375d8e23b1cd39d1 (patch)
tree5dd1f2584b56373ea531522c55a11bac41e6b9f8
parent7975592b94d65b6f356093694a76201de62a7a6a (diff)
disable batch when sequence training
-rw-r--r--nerv/examples/seq_trainer.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/nerv/examples/seq_trainer.lua b/nerv/examples/seq_trainer.lua
index df96e68..b8ed3eb 100644
--- a/nerv/examples/seq_trainer.lua
+++ b/nerv/examples/seq_trainer.lua
@@ -49,6 +49,7 @@ function build_trainer(ifname)
network:batch_resize(input[1]:nrow())
if network:propagate(input, {{}}) == true then
network:back_propagate({{}}, err_output, input, {{}})
+ gconf.batch_size = 1.0 - gconf.momentum -- important!!!
network:update({{}}, input, {{}})
end
-- collect garbage in-time to save GPU memory