AttributeError: ‘NoneType‘ object has no attribute ‘_free_weak_ref‘

AttributeError: 'NoneType' object has no attribute '_free_weak_ref'

yolov5训练时报错:
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'

问题解决:

降低pytorch版本。

之前使用的是1.11.3,降低成1.10.2

卸载之前的pytorch

复制代码
conda uninstall pytorch
conda uninstall libtorch

安装低版本的pytorch

复制代码
conda install pytorch==1.10.0 torchvision==0.11.0 cudatoolkit=10.2 -c pytorch
相关推荐
~小先生~11 分钟前
Python从入门到放弃(一)
开发语言·python
天佑木枫32 分钟前
第2天:变量与数据类型 —— 让程序记住信息
python
Dust-Chasing2 小时前
Claude Code源码剖析 - Claude Code 上下文压缩机制
人工智能·python·ai
Cloud_Shy6182 小时前
解读《Effective Python 3rd Edition》:从练气到老魔(第五章 Item 33 - 35)
开发语言·人工智能·笔记·python·学习方法
abcy0712133 小时前
python pandas csv异步后台清洗前端优先返回成功信息
前端·python·pandas
颜酱3 小时前
LangChain使用RAG 入门:让大模型读懂你的私有文档
python·langchain
天天进步20154 小时前
Python全栈项目--校园智能宿舍管理系统
开发语言·python
测试员周周4 小时前
【AI测试智能体-面试】AI测试面试60题(附回答思路)
人工智能·python·功能测试·测试工具·单元测试·自动化·测试用例
用户8356290780515 小时前
使用 Python 操作 Word 评论和回复
后端·python
Zella折耳根5 小时前
复习篇-继承和接口
java·开发语言·python