- 博客(1)
- 收藏
- 关注
原创 RuntimeError: CUDA out of memory. Tried to allocate 98.00 MiB (GPU 0; 6.00 GiB total capacity; 3.98
在报错的代码前后都加上这两句代码: if hasattr(torch.cuda, 'empty_cache'): torch.cuda.empty_cache() 再跑就可以了 原文从这里看到的 记录一下我的学习过程。
2021-03-06 11:07:18
2326
5
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人