【报错】服务器 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

相关推荐
J***79397 分钟前
Python在机器学习中的数据处理
开发语言·python·机器学习
深蓝电商API23 分钟前
初级爬虫反爬应对:解决 403、IP 限制的简单方法
爬虫·python
闲人编程1 小时前
Python协程的演进:从yield到async/await的完整历史
java·前端·python·async·yield·await·codecapsule
睿思达DBA_WGX1 小时前
使用 Python 的第三方库 xlrd 读取 Excel 文件
python·excel
大佬,救命!!!1 小时前
python实现五子棋
开发语言·python·个人开发·pygame·少儿编程·五子棋
明知道的博客4 小时前
解决WSL环境下DeepSeek-OCR运行时内存不足问题
python·ocr·deepseek·deepseek-ocr
FreeCode5 小时前
LangGraph1.0智能体开发:Graph API概念与设计
python·langchain·agent
test管家5 小时前
如何在Python中使用SQLite数据库进行增删改查操作?
python
yangmf20407 小时前
APM(三):监控 Python 服务链
大数据·运维·开发语言·python·elk·elasticsearch·搜索引擎
yangmf20407 小时前
APM(二):监控 Python 服务
大数据·python·elasticsearch·搜索引擎