bug:RuntimeError: CUDA out of memory. Tried to allocate 9.00 MiB (GPU 0; 11.17 GiB total capacity; 8

RuntimeError: CUDA out of memory. Tried to allocate 9.00 MiB (GPU 0; 11.17 GiB total capacity; 835.65 MiB already allocated; 704.00 KiB free; 874.50 KiB cached)

解决办法:
查看亚马逊gpu的使用情况

pip install gpustat
gpustat -cp

如果有没用的程序在跑,就杀死它。

sudo kill -9 19732

你可能感兴趣的:(bug)