CycleGAN
CycleGAN copied to clipboard
train.lua crashes with batchSize bigger than 1
[...]/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
Yes, same here. Anyone found a patch for this?
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
I fixed the bugs in the save_current_results
. Let me know if it works for you with batchSize>1