Skip to content

Commit

Permalink
Add collectgarbage in main to avoid PANIC errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassa committed May 26, 2015
1 parent 6a5dcbf commit 7b34a56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.lua
Expand Up @@ -66,7 +66,9 @@ for i=1,opt.num_iter do
trainer:train(inputs,targets)
print('==> Training Error: '..trainer.fx[i])
print(trainer.confusion)


collectgarbage()

err = validator:validate(criterion)
print('==> Validation Error: '..err)
table.insert(val_err,err)
Expand Down

0 comments on commit 7b34a56

Please sign in to comment.