当前位置:   article > 正文

CUDA out of memory问题(已解决)深度学习_outofmemoryerror: cuda out of memory

outofmemoryerror: cuda out of memory

#Cuda out of memory 问题解决

  1. RuntimeError:CUDA out of memory.Tried to allocate 256.00 MiB (GPU0;23.70GiBtotal capacity;844.99 MiB already allocated;186.44 MiB free:868.00 MiBreserved in total by PyTorch)If reserved memory is >allocated memory trysettingmax split size mb to avoid fragmentation. See documentation for MemoryManagement and PYTORCH CUDA ALLOC CONF
    错误截图

错误原因1:有占内存进程在运行

解决方案:
Nvidia-smi查看占内存的进程号
kill -KILL 进程号

错误原因2:batch size太大,尝试调小

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/88915
推荐阅读
相关标签
  

闽ICP备14008679号