解决CUDA out of memory. Tried to allocate 2.10 GiB (GPU 0; 14.76 GiB total capac......

  • 问题
  • 解决方案

参考了一篇博文 https://blog.csdn.net/weixin_32393347/article/details/104395179

问题

在进行网络训练时报错

CUDA out of memory. Tried to allocate 2.10 GiB (GPU 0; 14.76 GiB total capacity; 1.06Gib already allocated; 138.44Mib free; 18.32Mib cached)

解决方案

降低batch_size大小或在报错代码前加上:释放无关内存

if hasattr(torch.cuda, 'empty_cache'):torch.cuda.empty_cache()

解决CUDA out of memory. Tried to allocate 2.10 GiB (GPU 0; 14.76 GiB total capac相关推荐

  1. 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 ...

  2. CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 6.00 GiB total capacity;总结(1)

    CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 6.00 GiB total capacity; 4.54 GiB already al ...

  3. 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; ...

  4. 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 ...

  5. 报错`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. ...

  6. 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 ...

  7. CUDA out of memory. Tried to allocate 392.00 MiB (GPU 0; 10.76 GiB total capacity; 652.77 MiB alread

    在使用Pytorch中,出现CUDA out of memory. Tried to allocate 392.00 MiB (GPU 0; 10.76 GiB total capacity; 652 ...

  8. 解决:RuntimeError: CUDA out of memory. Tried to allocate 64.00 MiB (GPU 0; 4.00 GiB total capacity; 2

    引发pytorch:CUDA out of memory错误的原因有两个: 1.当前要使用的GPU正在被占用,导致显存不足以运行你要运行的模型训练命令不能正常运行 解决方法: 1.换另外的GPU 2. ...

  9. [881]内存不足RuntimeError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 2.00 GiB total cap...

    今天第一次在服务器上跑代码 也是第一次接触cuda显存卡 碰到了标题问题 将解决办法记录下来 1. 首先去查看cuda显存占用情况: nvidia-smi 显示所有GPU的当前信息状态(图源网络 不想 ...

最新文章

  1. 使用awk,sort和uniq从ATS访问日志中统计出异常链接域名的次数排名
  2. 【正一专栏】读《艾思奇哲学文选第六卷》
  3. BZOJ 5326 [JSOI2017]博弈 (模拟费用流、线段树)
  4. 火炬之光2找不到服务器,火炬之光2无法运行解决办法详细介绍
  5. glass fish_Glass Fish 4.0.1中的Jersey SSE功能
  6. conda清华源安装pytorch依旧慢踩坑
  7. 智慧园区运营服务平台方案
  8. python pywifi 破解wifi密码
  9. kaggle电影数据分析报告
  10. 机器学习中的数学——常用概率分布(三):二项分布(Binomial分布)
  11. Java线程状态中BLOCKED和WAITING有什么区别?
  12. CSS入门二、美化页面元素
  13. iOS上架appstore详细教材
  14. 手把手教你看懂电脑硬件测试软件CPU-Z(二)
  15. Java的同步锁和同步方法(synchronized)
  16. 个人博客系列【Hexo】——git 使用ssh协议免密登录
  17. 手持式频谱分析仪 TFN的715c和760c怎么样
  18. ArcGIS Pro硬件要求
  19. Vue前端项目部署在tomcat
  20. 中国公布建设网络强国的时间表和路线图

热门文章

  1. opencvjs 磨皮美颜
  2. php条件查询,PHP-----多条件查询(示例代码)
  3. java判断是否是数组_Java判断对象类型是否为数组
  4. 洛谷P2455 [SDOI2006]线性方程组
  5. 在电脑中安装群辉NAS
  6. 如何将PDF转换成JPG——speedPDF在线免费批量PDF转JPG
  7. 弹性盒子flex布局
  8. python opencv 人体/人脸识别 简易demo
  9. Excel数据透视表之多重合并
  10. 分析ctr模型效果的一些思路总结