小约翰克涵 2022-05-29 17:24 采纳率: 42.9%
浏览 377

RuntimeError: CUDA out of memory.

RuntimeError: CUDA out of memory. Tried to allocate 446.00 MiB (GPU 0; 2.00 GiB total capacity; 1.34 GiB already allocated; 0 bytes free; 1.35 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
已加with torch.no_grad():还是没有解决,是不是必须要搭一个服务器才可以运行
有无其他解决方法

  • 写回答

1条回答 默认 最新

  • 扫地的小何尚 优质创作者: 人工智能技术领域 2022-05-30 21:18
    关注

    其实, 你首先尝试下在完全命令行的形式上跑, 关闭图形界面试试, 他也占显存.
    你需要的显存并不大, 有可能实现的

    评论

报告相同问题?

问题事件

  • 创建了问题 5月29日