当前位置:   article > 正文

显存不足问题(OOM、RuntimeError: CUDA out of memory)_oom runtimeerror is raised due to the huge memory

oom runtimeerror is raised due to the huge memory cost during label assignme

显存不足问题(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中出现的,爆显存了,同上。

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

相关仓库

模型路径
YoloV3https://github.com/bubbliiiing/yolo3-pytorch
Efficientnet-Yolo3https://github.com/bubbliiiing/efficientnet-yolo3-pytorch
YoloV4https://github.com/bubbliiiing/yolov4-pytorch
YoloV4-tinyhttps://github.com/bubbliiiing/yolov4-tiny-pytorch
Mobilenet-Yolov4https://github.com/bubbliiiing/mobilenet-yolov4-pytorch
YoloV5https://github.com/bubbliiiing/yolov5-pytorch
YoloXhttps://github.com/bubbliiiing/yolox-pytorch
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/418210
推荐阅读
相关标签
  

闽ICP备14008679号