当前位置:网站首页>4、yolov5-6.0 ERROR: AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 解决方案
4、yolov5-6.0 ERROR: AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 解决方案
2022-07-30 09:28:00 【komla168】
前言:使用yolov5-6.0版本想检测几张图,就出现了题目中的问题,可以看出是上采样函数不太对,现把解决方案记录下。
版本:Yolov5-6.0、Python3.8、Pytorch1.11.0
一、问题复现

二、官网解决方案
这个问题在yolov5版本中第一次出现,而且是和Pytorch 1.11.0有关系。


就是说,在train和detect时都有可能会遇到这个问题 。下面是降低Pytorch版本解决方案,降到10以内。

然后这个博主又针对Pytorch版本1.11.0的做了fix
但是好像没解决,笔者torch版本是1.11.0,还是出现这个问题了。
网友给出的修改上采样函数解决方案。


确实解决了,网友666。 
三、引用文献
3.1 PyTorch 1.11.0 compatibility updates (#1914) · ultralytics/[email protected] · GitHub
3.2 https://github.com/ultralytics/yolov5/issues/5499
3.3 AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘_阳光不锈@的博客-CSDN博客
边栏推荐
- (C语言)文件操作
- leetcode 剑指 Offer 58 - I. 翻转单词顺序
- 百度paddleocr检测训练
- 编译报错: undefined reference to `google::FlagRegisterer::FlagRegisterer解决方法
- 你真的懂Redis的5种基本数据结构吗?
- 快解析结合泛微OA
- New in GNOME: Warn users when Secure Boot is disabled
- ospf2双点双向重发布(题2)
- Day113. Shangyitong: WeChat login QR code, login callback interface
- Test automation selenium (a)
猜你喜欢

论文阅读:SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers

EViews 12.0 software installation package download and installation tutorial

你真的懂Redis的5种基本数据结构吗?

梅科尔工作室-看鸿蒙设备开发实战笔记六—无线联网开发

JVM内存布局、类加载机制及垃圾回收机制详解

Re18: Read the paper GCI Everything Has a Cause: Leveraging Causal Inference in Legal Text Analysis

69. Sqrt(x)x 的平方根

SST-Calib:结合语义和VO进行时空同步校准的lidar-visual外参标定方法(ITSC 2022)

多线程--线程和线程池的用法

leetcode 剑指 Offer 48. 最长不含重复字符的子字符串
随机推荐
快解析结合任我行crm
If someone asks you about distributed transactions again, throw this to him
A new generation of free open source terminal tool, so cool
leetcode 剑指 Offer 58 - I. 翻转单词顺序
(Text) Frameless button settings
CVTE校招笔试题+知识点总结
leetcode 剑指 Offer 46. 把数字翻译成字符串
容器技术 -- 简单了解 Kubernetes 的对象
leetcode 剑指 Offer 57. 和为s的两个数字
线程池方式开启线程--submit()和execute()的区别
pnpm简介
Oracle 创建和操作表
Meikle Studio-Look at the actual combat notes of Hongmeng device development six-wireless networking development
EViews 12.0软件安装包下载及安装教程
leetcode 剑指 Offer 48. 最长不含重复字符的子字符串
Unified exception handling causes ResponseBodyAdvice to fail
线上靶机prompt.ml
The use of qsort function and its analog implementation
Meikle Studio - see the actual combat notes of Hongmeng equipment development five - drive subsystem development
Day113. Shangyitong: WeChat login QR code, login callback interface