torch / torch7

http://torch.ch
Other
8.97k stars 2.38k forks source link

lua/5.1/torch error #1017

Closed MironaGamil closed 7 years ago

MironaGamil commented 7 years ago

@soumith I have this error when i train neuraltalk2(https://github.com/karpathy/neuraltalk2), any help??

THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-2683/cutorch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory /home/mri/torch/install/bin/lua: /home/mri/torch/install/share/lua/5.1/torch/File.lua:351: cuda runtime error (2) : out of memory at /tmp/luarocks_cutorch-scm-1-2683/cutorch/lib/THC/generic/THCStorage.cu:66 stack traceback: C: in function 'read' /home/mri/torch/install/share/lua/5.1/torch/File.lua:351: in function </home/mri/torch/install/share/lua/5.1/torch/File.lua:245> C: in function 'read' /home/mri/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject' /home/mri/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject' /home/mri/torch/install/share/lua/5.1/nn/Module.lua:192: in function 'read' /home/mri/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject' /home/mri/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject' /home/mri/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject' /home/mri/torch/install/share/lua/5.1/nn/Module.lua:192: in function 'read' /home/mri/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject' /home/mri/torch/install/share/lua/5.1/nn/Module.lua:140: in function 'clone' train_new.lua:152: in main chunk C: in function 'dofile' .../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk

albanD commented 7 years ago

Your GPU runs out of memory when trying to clone the network, you may want to reduce the batch size.

MironaGamil commented 7 years ago

@albanD I reduced the batch size the same error happened

albanD commented 7 years ago

That depends on how much memory your GPU have. Especially if you use very large networks, you will need a big GPU to be able to work with them.