模型跑完想再跑一遍的时候居然给我报“CUDA out of memory”,很明显,我的显卡虽然菜,但起码还是可以跑的,毕竟刚跑完,那就可能是python在运行完以后没有释放资源,导致GPU的内存满了。
如果是这样的话,那解决的方法就很简单了,直接把进程杀死就行。
首先在C:\Program Files\NVIDIA Corporation\NVSMI位置打开命令行,然后输入nvidia-smi(也可以用nvidia-smi.exe -l 1,每秒更新CUDA使用情况),显示当前gpu的使用情况如下:

显然,杀死8868这个进程就完事,命令如下:

taskkill -PID 进程号 -F


这时再看一下gpu的使用情况,发现没有进程占用了,再运行项目也就跑起来了!

CUDA out of memory(然鹅明明还有空间)相关推荐

  1. 明明有内存报错CUDA out of memory

    RuntimeError: CUDA out of memory. Tried to allocate 2.42 GiB (GPU 0; 24.00 GiB total capacity; 113.8 ...

  2. 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 刚刚我尝 ...

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

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

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

  5. Pytorch 训练与测试时爆显存(cuda out of memory)的终极解决方案,使用cpu(勿喷)

    Pytorch 训练与测试时爆显存(cuda out of memory)的终极解决方案,使用cpu(勿喷) 参见了很多方法,都没有用. 简单点,直接把gpu设成-1

  6. CUDA out of memory in pytorch

    with torch.no_grad(): CUDA out of memory in pytorch 今天尝试了一下Transformer,一直遇到当validate若干次之后爆显存,一开始以为参数 ...

  7. CUDA内存类型memory

    CUDA内存类型memory 2013-09-30 10:34 4224人阅读 评论(1) 收藏 举报 分类: CUDA(106) http://www.cnblogs.com/traceorigin ...

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

  9. CUDA out of memory. Tried to allocate 14763.13 GiB (GPU 3; 10.73 GiB total capacity; 165.28 MiB alre

    RuntimeError: CUDA out of memory. Tried to allocate 14763.13 GiB (GPU 3; 10.73 GiB total capacity; 1 ...

最新文章

  1. sourceinsight无法跳转函数_使用SourceInsight的三大理由,最后一点是关键!
  2. WebStorm 2019.3.1安装教程
  3. regex在.NET里判断输入信息的合法性
  4. vb for循环 combobox的使用 Print的使用
  5. Android中attrs.xml文件的使用详解
  6. 【重点】LeetCode 143. Reorder List
  7. 随机游走问题的神奇应用(三)
  8. 浏览器文件分段断点上传简单示例(python 篇)
  9. 【2019银川网络赛D:】Take Your Seat(概率--递推+思维)
  10. ad中电容用什么封装_【AD封装】贴片插件晶振(带3D)
  11. java-for循环9的倍数(基础)
  12. 怎么卸载quartus_分享一个Quartus工程清理方法
  13. win10下创建FTP站点
  14. Java学习笔录3(变量和常量)
  15. 睡眠手环APP开发上线
  16. 26个数据分析案例——第二站:基于Hive的民航客户价值分析
  17. SF25 | 日内交易策略开发(一)黄金日内交易模型
  18. linux里hba状态_(转)Linux主机HBA常用操作指南
  19. realloc动态内存调整探究
  20. 新浪微博开发之授权用户登录的实现

热门文章

  1. 配色那么差,还不‘哥屋恩’去看电影!
  2. OGM 与mongodb
  3. WPF设备无关单位(DIU)
  4. python—判断语句练习题05
  5. JVM笔记:Java虚拟机的字节码指令详解
  6. 使用频率最高的美语口语296句(本人精心整理,按使用频率排序)
  7. linux之ps命令--进程快照
  8. 不用写软件,纯JS 实现QQ空间自动点赞
  9. 西邮Linux兴趣小组2019-2021年纳新面试题解析
  10. 语言学习游戏的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告