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
相关推荐
xinxiyinhe38 分钟前
如何设置Cursor中.cursorrules文件
人工智能·python
诸神缄默不语1 小时前
如何用Python 3自动打开exe程序
python·os·subprocess·python 3
橘子师兄1 小时前
分页功能组件开发
数据库·python·django
Logintern092 小时前
使用VS Code进行Python编程的一些快捷方式
开发语言·python
Multiple-ji2 小时前
想学python进来看看把
开发语言·python
liuyuzhongcc2 小时前
List 接口中的 sort 和 forEach 方法
java·数据结构·python·list
鸟哥大大3 小时前
【Python】pypinyin-汉字拼音转换工具
python·自然语言处理
jiugie3 小时前
MongoDB学习
数据库·python·mongodb
阿尔法波3 小时前
python与pycharm如何设置文件夹为源代码根目录
开发语言·python·pycharm
xing25163 小时前
pytest下allure
开发语言·python·pytest