报错
RuntimeError: CUDA out of memory. Tried to allocate 636.00 MiB (GPU 0; 10.76 GiB total capacity; 3.77 GiB already allocated; 497.25 MiB free; 4.67 GiB reserved in total by PyTorch)
解决方案
一、清空GPU缓存
nvidia-smi
2.查看正在运行的进程
fuser -v /dev/nvidia*
3.kill进程
kill -9 PID