当前位置:   article > 正文

pytorch解决RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 G_torch.cuda.outofmemoryerror: cuda out of memory. t

torch.cuda.outofmemoryerror: cuda out of memory. tried to allocate 20.00 mib

将batch_size改小,我将batch_size从2修改为1,代码成功运行了

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

闽ICP备14008679号