karpathy / neuraltalk2

Efficient Image Captioning code in Torch, runs on GPU
5.49k stars 1.26k forks source link

train.lua error , cuda runtime error (2) : out of memory #199

Open Mozhdeh-d opened 5 years ago

Mozhdeh-d commented 5 years ago

Hi, After downloading MS COCO dataset and run prepo.py, when I try to train, the following error appears:

THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-5309/cutorch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory /home/linux/torch/install/bin/luajit: /home/linux/torch/install/share/lua/5.1/torch/File.lua:351: cuda runtime error (2) : out of memory at /tmp/luarocks_cutorch-scm-1-5309/cutorch/lib/THC/generic/THCStorage.cu:66

Any solutions? :(

P.S when I run it on CPU mode by passing the parameter -gpuid -1, it starts training. But I think it never ends!

Mozhdeh-d commented 5 years ago

It was due to the gpu memory size. I run it on some othe computer with higher gpu memory size. Close the issue