【报错】服务器 cuda out of memory

RuntimeError: CUDA out of memory. Tried to allocate 32.00 MiB (GPU 0; 23.64 GiB total capacity; 21.55 GiB already allocated; 17.75 MiB free; 21.60 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
RuntimeError: CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 23.64 GiB total capacity; 17.64 GiB already allocated; 118.25 MiB free; 19.15 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翻译这段话
运行时错误:CUDA内存不足。尝试分配 2.00 GiB 的内存(GPU 0;总容量为 23.64 GiB;已分配 17.64 GiB;可用内存为 118.25 MiB;PyTorch 已保留 19.15 GiB 总内存)。如果保留的内存远大于分配的内存,试着设置 `max_split_size_mb` 以避免内存碎片化。有关内存管理和 `PYTORCH_CUDA_ALLOC_CONF` 的更多信息,请参阅文档。

batch size 改小 4→2

硬件跟不上,深度学习真玩不起

无卡启用 V100

有卡启用 V100

相关推荐
高洁0110 分钟前
智能体:你的私人数字助理
人工智能·python·数据挖掘·virtualenv·知识图谱
海鸥-w10 分钟前
python(fastapi) 实现更新,新增,删除接口
android·python·fastapi
淘矿人11 分钟前
DeepSeek V4对决Claude 4.8:AI模型终极横评
java·开发语言·人工智能·python·sql·php·pygame
showgea19 分钟前
Python httpx封装和使用
python·httpx
Asize35 分钟前
重生之我在 Vibe Coding 时代当程序员:第十二课,Prompt 不是咒语,是可以沉淀的业务接口
前端·人工智能·python
abigale0343 分钟前
字典 与 Python 对象 的总结
python·dict·object
星河漫步Lu1 小时前
Pycharm中部署Anaconda环境
ide·python·pycharm
qq_283720052 小时前
2026 最新 Python+AI 零基础入门全教程 :从零搭建人工智能完整项目
开发语言·人工智能·python
时尚IT男2 小时前
Python发票识别实战:从PDF中精准提取发票号与(小写)¥金额
开发语言·python·pdf