蜡笔small欣️ 2023-10-12 17:55 采纳率: 0%
浏览 24

训练模型时显示CUDA内容不足

训练模型时显示CUDA内容不足,我的显卡是4060-8G
错误是torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 256.00 MiB (GPU 0; 8.00 GiB total capacity; 933.87 MiB already allocated; 4.95 GiB free; 948.00 MiB 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
请教大家如何解决 并且batchsize已经设置为1

img

  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2023-10-12 21:14
    关注

    【相关推荐】




    如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^
    评论

报告相同问题?

问题事件

  • 修改了问题 10月12日
  • 创建了问题 10月12日