PyTorch CUDA内存不足

问题描述

我正在尝试使用pytorch运行建模脚本。我尝试了批处理,每次只能向模型发送30个视频。

 File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/activation.py",line 988,in forward
    return F.prelu(input,self.weight)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py",line 1319,in prelu
    return torch.prelu(input,weight)
**RuntimeError: CUDA out of memory. Tried to allocate 2.19 GiB (GPU 0; 11.17 GiB total capacity; 7.43 GiB already allocated; 535.31 MiB free; 10.58 GiB reserved in total by PyTorch)
^M 83%|████████▎ | 5/6 [00:39<00:07,7.82s/it]**

我试图了解此错误表示什么?有什么建议可以解决吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)