#Cuda out of memory 问题解决
- RuntimeError:CUDA out of memory.Tried to allocate 256.00 MiB (GPU0;23.70GiBtotal capacity;844.99 MiB already allocated;186.44 MiB free:868.00 MiBreserved in total by PyTorch)If reserved memory is >allocated memory trysettingmax split size mb to avoid fragmentation. See documentation for MemoryManagement and PYTORCH CUDA ALLOC CONF
错误原因1:有占内存进程在运行
解决方案:
Nvidia-smi查看占内存的进程号
kill -KILL 进程号