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
相关推荐
2301_7644413327 分钟前
使用python构建的应急物资代储博弈模型
开发语言·python·算法
喏喏心1 小时前
深度强化学习:价值迭代与Bellman方程实践
人工智能·python·学习·机器学习
小白勇闯网安圈1 小时前
supersqli、web2、fileclude、Web_python_template_injection
python·网络安全·web
用户8356290780511 小时前
从一维到二维:用Spire.XLS轻松将Python列表导出到Excel
后端·python
l木本I2 小时前
uv 技术详解
人工智能·python·深度学习·机器学习·uv
宁大小白2 小时前
pythonstudy Day31
python·机器学习
江上鹤.1482 小时前
Day34模块和库的导入
python
我爱鸢尾花2 小时前
第十四章聚类方法理论及Python实现
大数据·python·机器学习·数据挖掘·数据分析·聚类
言之。3 小时前
Dropbear远程连接
python
dhdjjsjs4 小时前
Day34 PythonStudy
python