YOLOV5 | AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 问题解决 亲测有效
yolov5
yolov5 - Ultralytics YOLOv8的前身,是一个用于目标检测、图像分割和图像分类任务的先进模型。
项目地址:https://gitcode.com/gh_mirrors/yo/yolov5
免费下载资源
·
报错:AttributeError: ‘Upsample’ object has no attribute ‘recompute_scale_factor’
如图:
解决方法
1.点击报错行该路径,进入编辑页
2.将原代码(153-154行)修改为如下所示(155行):
即:
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)
问题解决
保存后再次运行detect.py,即可:
原文链接:https://blog.csdn.net/weixin_43401024/article/details/124428432
GitHub 加速计划 / yo / yolov5
555
37
下载
yolov5 - Ultralytics YOLOv8的前身,是一个用于目标检测、图像分割和图像分类任务的先进模型。
最近提交(Master分支:26 天前 )
6981c274
Refactor code for speed and clarity
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> 7 天前
f003c3df
This commit resolves an issue where the save-csv command did not write the CSV header. The code now correctly saves the header in the CSV file.
Signed-off-by: Ali Ghanbari <alighanbari446@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> 12 天前
更多推荐
已为社区贡献12条内容
所有评论(0)