pytorch报错:RuntimeError: CUDA out of memory.(CUDA内存不足)

RuntimeError: CUDA out of memory

For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

查看gpu使用情况:

nvidia-smi

找到运行的py文件

import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"

参考icon-default.png?t=M276https://blog.csdn.net/wcy23580/article/details/90177136

你可能感兴趣的:(工具,pytorch,深度学习,目标检测)