当前位置:网站首页>运行yolo v5-5.0版本报错找不到SPPF错误,进行解决
运行yolo v5-5.0版本报错找不到SPPF错误,进行解决
2022-07-07 15:40:00 【AI炮灰】
首先找到yolov5下面的models文件夹下面的common.py文件,如下所示:

找到该文件夹下面的SPP类,

然后在该类的上面添加SPPF类,如下所示,
class SPPF(nn.Module):
def __init__(self, c1, c2, k = 5):
super().__init__()
c_ = c1 // 2
self.cv1 = Conv(c1, c_, 1, 1)
self.cv2 = Conv(c_ * 4, c2, 1, 1)
self.m = nn.MaxPool2d(kernel_size=k, stride=1, padding=k // 2)
def forward(self, x):
x = self.cv1(x)
with warnings.catch_warnings():
warnings.simplefilter('ignore')
y1 = self.m(x)
y2 = self.m(y1)
return self.cv2(torch.cat([x, y1, y2, self.m(y2)], 1))可以直接将上面代码复制上去即可。然后该错误就进行了解决。
边栏推荐
- 网络攻防复习篇
- LeetCode 648(C#)
- How to implement safety practice in software development stage
- Function and usage of textswitch text switcher
- 百度地图自定义样式向右拖拽导致全球地图经度0度无法正常显示
- Flash build API service
- toast会在程序界面上显示一个简单的提示信息
- 深入浅出图解CNN-卷积神经网络
- Establishment of solid development environment
- Audio Device Strategy 音频设备输出、输入 选择 基于7.0 代码
猜你喜欢

With the latest Alibaba P7 technology system, mom doesn't have to worry about me looking for a job anymore

Mrs offline data analysis: process OBS data through Flink job

textSwitch文本切换器的功能和用法
![[video / audio data processing] Shanghai daoning brings you elecard download, trial and tutorial](/img/14/4e7ebfb1ed5b99f8377af9d17d2177.jpg)
[video / audio data processing] Shanghai daoning brings you elecard download, trial and tutorial

使用popupwindow創建对话框风格的窗口

2021-06-28

本周小贴士#136:无序容器

imageswitcher的功能和用法

专精特新软件开发类企业实力指数发布,麒麟信安荣誉登榜

Dateticket and timeticket, functions and usage of date and time selectors
随机推荐
LeetCode1051(C#)
actionBar 导航栏学习
网络攻防复习篇
toast会在程序界面上显示一个简单的提示信息
字符串 - string(Lua)
Notes on installing MySQL in centos7
企业经营12法的领悟
Jenkins发布uniapp开发的H5遇到的问题
Sator a lancé le jeu web 3 "satorspace" et a lancé huobi
让保险更“保险”!麒麟信安一云多芯云桌面中标中国人寿, 助力金融保险信息技术创新发展
【网络攻防原理与技术】第1章:绪论
【可信计算】第十一次课:TPM密码资源管理(三) NV索引与PCR
Siggraph 2022 best technical paper award comes out! Chen Baoquan team of Peking University was nominated for honorary nomination
DevOps 的运营和商业利益指南
大笨钟(Lua)
状态模式 - Unity(有限状态机)
textSwitch文本切换器的功能和用法
TabHOST 选项卡的功能和用法
Devops' operational and commercial benefits Guide
Functions and usage of ratingbar