e-lab / LinkNet

166 stars 42 forks source link

Torch: not enough memory (17GB) #6

Closed amiltonwong closed 7 years ago

amiltonwong commented 7 years ago

Hi, all

When I run : th main.lua --datapath /data2/cityscapes_dataset/leftImg8bit/all_train_images/ --cachepath /data2/cityscapes_dataset/leftImg8bit/dataCache/ --dataset cs --model models/model.lua --save save_models/cityscapes/ --saveTrainConf --saveAll --plot

I got "Torch: not enough memory: you tried to allocate 17GB" error (details)

It's strange because the paper mentioned it is trained using Titan X which has 12GB memory. Why the network consumes 17GB in running?

Any suggestion to fix this issue?

Thanks!

codeAC29 commented 7 years ago

@amiltonwong check your input image size and batch size. For cityscapes it should be 512x1024 and 10 respectively.

amiltonwong commented 7 years ago

Hi, @codeAC29 ,

Could I resize the input image using your package or other tools such as PIL or OpenCV?

codeAC29 commented 7 years ago

The training script will automatically resize it for you. Just use imHeight and imWidth option while training.