使用GPU训练yolo_v2报错:RuntimeError: CUDA out of memory. Tried to allocate XXX MiB
报错内容:
RuntimeError: CUDA out of memory. Tried to allocate 200.00 MiB (GPU 0; 8.00 GiB total capacity; 5.96 GiB already allocated; 0 bytes free; 6.18 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
这个报错的意思就是:
运行时错误:CUDA内存不足。尝试分配200.00个MiB(GPU 0;8.00 GiB总容量;5.96 GiB已分配;0字节空闲;PyTorch总共保留6.18 GiB)如果保留内存>>已分配内存,请尝试设置最大拆分大小以避免碎片。
错误原因:
显卡内存不够,因为显卡内存不够大的话,当batch_size过大,那么处理的数据量就过大,训练时模型的所有参数都会参与计算,数据内存就会溢出,显卡内存就不够用了。
解决办法:
训练时候,将batch_size 改小点,例如:
python train.py --cuda --batch_size 64 --num_workers 0
改为:
python train.py --cuda --batch_size 2 --num_workers 0
使用GPU训练yolo_v2报错:RuntimeError: CUDA out of memory. Tried to allocate XXX MiB相关推荐
- 报错`RuntimeError: CUDA out of memory. Tried to allocate 256.00 MiB (GPU 0; 9.78 GiB total capaci
报错RuntimeError: CUDA out of memory. Tried to allocate 256.00 MiB (GPU 0; 9.78 GiB total capacity; 8. ...
- 已解决yolov5报错RuntimeError: CUDA out of memory. Tried to allocate 14.00 MiB
问题 RuntimeError: CUDA out of memory. Tried to allocate 14.00 MiB (GPU 0; 4.00 GiB total capacity; 2. ...
- Faster rcnn 训练coco2017数据报错 RuntimeError: CUDA error: device-side assert triggered
Faster rcnn 训练coco2017数据报错 RuntimeError: CUDA error: device-side assert triggered 使用faster rcnn训练自己的 ...
- RuntimeError: CUDA out of memory. Tried to allocate 132.00 MiB (GPU 2; 3.95 GiB total capacity; 3.41
pytorch报错:RuntimeError: CUDA out of memory. Tried to allocate 132.00 MiB (GPU 2; 3.95 GiB total capa ...
- 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 ...
- 爆显存: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. ...
- 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; ...
- RuntimeError: CUDA out of memory.Tried to allocate 20.00 MiB GPU 0 ,3.94 GiB total capacity 3.36 G
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 3.94 GiB total capacity; 3.36 ...
- RuntimeError: CUDA out of memory. Tried to allocate 1.54 GiB...
报错 F:\Anaconda3\python.exe "E:/Program Files/PyCharm 2019.2/***/xxx.py" F:\Anaconda3\lib\s ...
最新文章
- CLR via C# 读书笔记 1-2 创建线程的成本
- matlab 十六进制数组,【MATLAB】MATLAB中读取二进制数据文件并加入到矩阵中
- 什么能在main()函数之前或之后执行
- 《Iterative-GAN》的算法伪代码整理
- 智器SmartQ T7实体店试用体验
- 经验与教训:测试员的偏向
- CentOS 6.2 中文
- 剑指offer:字符串的排列
- 64位Linux下安装iNode客户端
- 深度学习——时间序列模型评价指标总结
- html 页面数据显示不全,解决了一个Web网页显示不全的BUG
- R语言ARIMA-GARCH波动率模型预测股票市场苹果公司日收益率时间序列
- gnuplot用C语言程序画图,gnuplot使用
- 在mysql中查询时间最小的一条记录
- 【小5聊】winform窗体之最小化事件捕捉以及最小化到任务栏功能
- JAVA基础试题抄录
- 数据链路层 (一)------ 计算机网络(三)
- GemBox.Pdf v15Crack
- E0413: 不存在从 “std::string“ 到 “const char *“ 的适当转换函数
- PWA(Progressive Web App)初探总结