maudzung / TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch

Unofficial implementation of "TTNet: Real-time temporal and spatial video analysis of table tennis" (CVPR 2020)
https://arxiv.org/pdf/2004.09927.pdf
602 stars 159 forks source link

CUDA runtime error #9

Closed panchul closed 4 years ago

panchul commented 4 years ago

Trying to run the training, but before a single epoch is finished, getting a RuntimeError:

`TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src$ python main.py --gpu_idx 0 ...

Epoch: [1/40] learning rate: 1.00e-03 ... RuntimeError: CUDA out of memory. Tried to allocate 6.68 GiB (GPU 0; 5.79 GiB total capacity; 3.25 GiB already allocated; 535.38 MiB free; 3.26 GiB reserved in total by PyTorch)`

Is there any way to limit the memory usage, or have a smaller test set?

maudzung commented 4 years ago

Hi @panchul

You need to reduce the batch_size to solve the problem.

panchul commented 4 years ago

Oh, Thanks. I think it would be nice to put a formula inside to adjust that setting to cap it according to the available CUDA memory.