显存不足问题(OOM、RuntimeError: CUDA out of memory)。

记录一次pytorch yolov3爆显存(windows使用任务管理器查看显存为4G)。

2G显存:SSD、YOLOV4-TINY
4G显存:YOLOV3
6G显存:YOLOV4、Retinanet、M2det、Efficientdet、Faster RCNN等
8G+显存:随便选吧。
解决方法:减小batch_size,需要注意的是,受到BatchNorm2d影响,batch_size不可为1,至少为2。

问:为什么提示 RuntimeError: CUDA out of memory. Tried to allocate 52.00 MiB (GPU 0; 15.90 GiB total capacity; 14.85 GiB already allocated; 51.88 MiB free; 15.07 GiB reserved in total by PyTorch)?
答:这是pytorch中出现的,爆显存了,同上。

 # 相关代码仓库可以参考下表所示

相关仓库

模型 路径
YoloV3 https://github.com/bubbliiiing/yolo3-pytorch
Efficientnet-Yolo3 https://github.com/bubbliiiing/efficientnet-yolo3-pytorch
YoloV4 https://github.com/bubbliiiing/yolov4-pytorch
YoloV4-tiny https://github.com/bubbliiiing/yolov4-tiny-pytorch
Mobilenet-Yolov4 https://github.com/bubbliiiing/mobilenet-yolov4-pytorch
YoloV5 https://github.com/bubbliiiing/yolov5-pytorch
YoloX https://github.com/bubbliiiing/yolox-pytorch

显存不足问题(OOM、RuntimeError: CUDA out of memory)相关推荐

  1. YOLOX训练:显存足够,但依旧CUDA out of memory(Tried to allocate 5.58 GiB,8.00 GiB total capacity,6.40 GiB free)

    问题已经解决,请参考以下博文: https://blog.csdn.net/ELSA001/article/details/120918082?spm=1001.2014.3001.5501 刚刚我尝 ...

  2. 通过设置PYTORCH_CUDA_ALLOC_CONF中的max_split_size_mb解决Pytorch的显存碎片化导致的CUDA:Out Of Memory问题

    问题的出现 最近在基友的带动下开始投身ai绘画的大潮,于是本地部署了stable diffusion web ui,利用手上的24G显存开始了愉快的跑高分辨率图片之旅.然而某天在用inpaint功能修 ...

  3. 爆显存:RuntimeError: CUDA out of memory. Tried to allocate 5.66 GiB (GPU 0; 12.00 GiB total capacity; 2

    报错:RuntimeError: CUDA out of memory. Tried to allocate 5.66 GiB (GPU 0; 12.00 GiB total capacity; 2. ...

  4. python pytorch爆显存,内存溢出问题解决方法(总结)RuntimeError: CUDA out of memory.

    问题描述 在运行python程序时,随运行时间增长,内存疯狂增加,直至运行内存爆满,出现以下错误: RuntimeError: CUDA out of memory. 解决方法: 1.在模型验证和测试 ...

  5. RuntimeError: CUDA out of memory

    报错内容: RuntimeError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 2.00 GiB total capacity; ...

  6. pytorch遇见RuntimeError: CUDA out of memory的解决

    RuntimeError: CUDA out of memory 1.查看是否其他程序占用显存 遇到此类错误后,对于py格式的文件来说,程序会进行终止,也就是当前程序占用的显存将会被释放.此时可用 w ...

  7. RuntimeError: CUDA out of memory. Tried to allocate 170.00 MiB (GPU 0; 3.82 GiB total capacity; 1.94

    错误: RuntimeError: CUDA out of memory. Tried to allocate 170.00 MiB (GPU 0; 3.82 GiB total capacity; ...

  8. RuntimeError: CUDA out of memory 已解决

    先说下我的电脑环境:win10 3060ti torch10 python3.8 cuda11.3 RuntimeError: CUDA out of memory. Tried to allocat ...

  9. RuntimeError: CUDA out of memory. Tried to allocate 50.00 MiB (GPU 0; 4.00 GiB total capacity; 682.9

    1. 问题 训练模型时报错: RuntimeError: CUDA error: out of memory CUDA kernel errors might be asynchronously re ...

最新文章

  1. 用泰勒公式算sin cos用c语言,用泰勒公式求sin(x)的近似值
  2. 利用matlab提取水印,怎么在含有水印的图像中提取出水印
  3. 走进统信软件,读懂国产操作系统新生态建设
  4. 如何保证消息队列的高可用
  5. 跑山么、后浪们?2.0T+237匹大马力后驱CT4山路试驾体验
  6. C++米勒拉宾算法模板
  7. gitlab 安装_安装Gitlab-注意端口
  8. 2018 开发者生态报告:Java 最流行,Go 最有潜力,JavaScript最常用
  9. SpringMVC学习(六)处理乱码问题
  10. java+maven工程 实现 自动对war包进行复制并修改和替换每个的配置文件
  11. 海康威视Java SDK实战
  12. 【九天教您南方cass 9.1】 06 绘制方格网
  13. 安卓bochs安装linux教程,Ubuntu环境下安装Bochs
  14. DNS无法解析IP_域名解析错误怎么办?域名解析错误原因有哪些?
  15. 从魔兽玩家到区块链领袖,V神是如何打造出区块链2.0代表的以太坊
  16. MySQL数据库实操教程(20)——视图
  17. 人脸识别最全知识图谱—清华大学出品(附全文下载)
  18. STM32平台的USART串口通信
  19. javascript实现电话号码验证
  20. java 椭圆拟合,OpenCV画轮廓的外界圆矩形椭圆等

热门文章

  1. excel部分网格线不见了_简单3步!用Excel制作电子印章,让你的文档更高大上
  2. 这些城市 你5w就可以买一套全款房
  3. html div标签空白占位,空白符对HTML结构的影响与解决方案
  4. Unity2020后PackingTag灰色,图集无法正常使用
  5. 【Linux】《Linux命令行与shell脚本编程大全 (第4版) 》笔记-Chapter16-脚本控制
  6. labview插件下载
  7. android音量控制setVolumeControlStream
  8. 10个免费的电子书搜索下载网站
  9. QOS 之 WRED
  10. Python学习教程:数据类型—字符串大总结