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
相关推荐
开源技术32 分钟前
如何将本地LLM模型与Ollama和Python集成
开发语言·python
weixin_4370446433 分钟前
Netbox批量添加设备——堆叠设备
linux·网络·python
我有医保我先冲34 分钟前
AI 时代 “任务完成“ 与 “专业能力“ 的区分:理论基础、行业影响与个人发展策略
人工智能·python·机器学习
测试开发Kevin1 小时前
小tip:换行符CRLF 和 LF 的区别以及二者在实际项目中的影响
java·开发语言·python
爱学习的阿磊1 小时前
使用PyTorch构建你的第一个神经网络
jvm·数据库·python
阿狸OKay1 小时前
einops 库和 PyTorch 的 einsum 的语法
人工智能·pytorch·python
编码者卢布2 小时前
【Azure Storage Account】Azure Table Storage 跨区批量迁移方案
后端·python·flask
可触的未来,发芽的智生2 小时前
狂想:为AGI代称造字ta,《第三类智慧存在,神的赐名》
javascript·人工智能·python·神经网络·程序人生
吴维炜2 小时前
「Python算法」计费引擎系统SKILL.md
python·算法·agent·skill.md·vb coding
FansyMeng3 小时前
VSCode配置anaconda
vscode·python