Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train.lua crashes with batchSize bigger than 1 #26

Open
dmas-at-wiris opened this issue Apr 25, 2017 · 3 comments
Open

train.lua crashes with batchSize bigger than 1 #26

dmas-at-wiris opened this issue Apr 25, 2017 · 3 comments

Comments

@dmas-at-wiris
Copy link

[...]/torch/install/bin/luajit: [...]/torch/install/share/lua/5.1/image/init.lua:176: [write_png_file] Depth must be 1, 3 or 4
stack traceback:
[C]: in function 'save'
/data/software/torch/install/share/lua/5.1/image/init.lua:176: in function 'saver'
/data/software/torch/install/share/lua/5.1/image/init.lua:442: in function 'save'
./util/visualizer.lua:50: in function 'save_results'
train.lua:96: in function 'save_current_results'
train.lua:154: in main chunk
[C]: in function 'dofile'
[...]/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

@Quasimondo
Copy link

Yes, same here. Anyone found a patch for this?

@Quasimondo
Copy link

Quasimondo commented May 19, 2017

Since the error occurs in visualizer.save_current_results one temporary patch is to comment out the part that calls it in train.lua (line 154):

if counter % opt.save_display_freq == 0 then
 --save_current_results(epoch, counter)
end

@junyanz
Copy link
Owner

junyanz commented Jun 18, 2017

I fixed the bugs in the save_current_results. Let me know if it works for you with batchSize>1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants