RuntimeError: CUDA out of memory
onnx20 opened this issue · comments
onnx commented
ubuntu16.04+cuda10+pytorch1.1.1+NVIDIA2080
I have a problem, the "RuntimeError: CUDA out of memory. Tried to allocate 52.00 MiB (GPU 0; 7.76 GiB total capacity; 5.63 GiB already allocated; 29.69 MiB free; 82.78 MiB cached)"
Thanks
Jian commented
Hi
Try to use with torch.no_grad(): to inference.
You can refer to https://github.com/vlad3996/FaceDetection-DSFD
N. YC. Kim commented
@lijiannuist
Can you clarify where to put torch.no_grad()
in demo.py
? I am getting the same error.