toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 305 forks source link

Cuda out of Memory Error #121

Open mmaaz60 opened 4 years ago

mmaaz60 commented 4 years ago

Hi,

It looks like pytorch by default keeping a lot of GPU memory and there isn't any memory available for the data to fit. I tried to train on two different Gpus, RTX 2080 Super (8 GB) and Titan Xp (12 GB) but same error. In case of RTX 2080 Super pytorch used to occupy around 6.5 GB of memory and in case of Titan Xp it occupy around 11 GB of memory. In conclusion I am not able to train the network for batch size > 1.

What could be the solution. There must be someway like it is in TF2.0 to limit the GPU memory used by the framework. Any help would be appreciated.

Regards, Maaz

AloveDL commented 4 years ago

try to reduce batch-size