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)

Home Page:https://arxiv.org/pdf/2004.09927.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CUDA runtime error

panchul opened this issue · comments

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?

Hi @panchul

You need to reduce the batch_size to solve the problem.

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.