我是靠谱客的博主 彪壮彩虹,这篇文章主要介绍AttributeError: ‘NoneType‘ object has no attribute ‘_free_weak_ref‘原因:解决方法,现在分享给大家,希望可以做个参考。
我在跑YOLOv5的代码时出现以上问题。
原因:
` 这是pytorch版本问题,如果你pytorch是比较高的版本,那么需要降低版本。
解决方法
可以使用以下命令:
pip install torch==1.10.0+cu113 torchvision==0.11.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple
最后
以上就是彪壮彩虹最近收集整理的关于AttributeError: ‘NoneType‘ object has no attribute ‘_free_weak_ref‘原因:解决方法的全部内容,更多相关AttributeError:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复