当前位置:网站首页>运行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))可以直接将上面代码复制上去即可。然后该错误就进行了解决。
边栏推荐
- 鲲鹏开发者峰会2022 | 麒麟信安携手鲲鹏共筑计算产业新生态
- Smart logistics platform: make overseas warehouses smarter
- 本周小贴士#135:测试约定而不是实现
- Notification is the notification displayed in the status bar of the phone
- LeetCode1051(C#)
- Sator a lancé le jeu web 3 "satorspace" et a lancé huobi
- 99%的人都不知道|私有化部署还永久免费的即时通讯软件!
- Mysql 索引命中级别分析
- [fan Tan] after the arrival of Web3.0, where should testers go? (ten predictions and suggestions)
- 赋能智慧电力建设 | 麒麟信安高可用集群管理系统,保障用户关键业务连续性
猜你喜欢

第3章业务功能开发(实现记住账号密码)

Matplotlib绘图界面设置

《世界粮食安全和营养状况》报告发布:2021年全球饥饿人口增至8.28亿

【可信计算】第十三次课:TPM扩展授权与密钥管理

第3章业务功能开发(安全退出)

麒麟信安携异构融合云金融信创解决方案亮相第十五届湖南地区金融科技交流会

What is cloud computing?

Mrs offline data analysis: process OBS data through Flink job

Toast will display a simple prompt message on the program interface

Functions and usage of serachview
随机推荐
Numberpick的功能和用法
viewflipper的功能和用法
本周小贴士#136:无序容器
麒麟信安中标国网新一代调度项目!
【TPM2.0原理及应用指南】 16、17、18章
Mrs offline data analysis: process OBS data through Flink job
【分布式理论】(二)分布式存储
What is cloud computing?
With the latest Alibaba P7 technology system, mom doesn't have to worry about me looking for a job anymore
【网络攻防原理与技术】第7章:口令攻击技术 第8章:网络监听技术
Sator launched Web3 game "satorspace" and launched hoobi
Matplotlib绘图界面设置
Share the latest high-frequency Android interview questions, and take you to explore the Android event distribution mechanism
99% of users often make mistakes in power Bi cloud reports
【解惑】App处于前台,Activity就不会被回收了?
serachview的功能和用法
DatePickerDialog和trimepickerDialog
《世界粮食安全和营养状况》报告发布:2021年全球饥饿人口增至8.28亿
【可信计算】第十三次课:TPM扩展授权与密钥管理
[fan Tan] those stories that seem to be thinking of the company but are actually very selfish (I: building wheels)