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
相关推荐
Fairy_sevenseven4 分钟前
[1]python爬虫入门,爬取豆瓣电影top250实践
开发语言·爬虫·python
ThisIsMirror8 分钟前
CompletableFuture并行任务超时处理模板
java·windows·python
java1234_小锋1 小时前
TensorFlow2 Python深度学习 - TensorFlow2框架入门 - 计算图和 tf.function 简介
python·深度学习·tensorflow·tensorflow2
程序员晚枫1 小时前
Python 3.14新特性:Zstandard压缩库正式加入标准库,性能提升30%
python
逆境清醒1 小时前
VS Code配置Python开发环境系列(1)___VScode的安装 ,VScode常用快捷键
vscode·python·visual studio code
万粉变现经纪人1 小时前
如何解决 pip install -r requirements.txt 无效可编辑项 ‘e .‘(-e 拼写错误)问题
开发语言·python·r语言·beautifulsoup·pandas·pip·scipy
潇凝子潇2 小时前
在使用Nacos作为注册中心和配置中心时,如何解决服务发现延迟或配置更新不及时的问题
开发语言·python·服务发现
烛阴2 小时前
Python 列表推导式:让你的代码更优雅、更高效
前端·python
AI小云2 小时前
【Python与AI基础】Python编程基础:函数与参数
人工智能·python
white-persist2 小时前
MCP协议深度解析:AI时代的通用连接器
网络·人工智能·windows·爬虫·python·自动化