当前位置:网站首页>Run Yolo v5-5.0 and report an error. If the sppf error cannot be found, solve it
Run Yolo v5-5.0 and report an error. If the sppf error cannot be found, solve it
2022-07-07 17:41:00 【AI cannon fodder】
First find yolov5 Below models Under the folder common.py file , As shown below :
Find the folder below SPP class ,
Then add SPPF class , As shown below ,
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))
You can directly copy the above code . Then the error is resolved .
边栏推荐
- L1-028 判断素数(Lua)
- 第3章业务功能开发(实现记住账号密码)
- 网络攻防复习篇
- 在窗口上面显示进度条
- 请将磁盘插入“U盘(H)“的情况&无法访问 磁盘结构损坏且无法读取
- [re understand the communication model] the application of reactor mode in redis and Kafka
- 阿富汗临时政府安全部队对极端组织“伊斯兰国”一处藏匿点展开军事行动
- Supplementary instructions to relevant rules of online competition
- 本周小贴士#134:make_unique与私有构造函数
- 【TPM2.0原理及应用指南】 1-3章
猜你喜欢
Function and usage of textswitch text switcher
状态模式 - Unity(有限状态机)
ViewSwitcher的功能和用法
第3章业务功能开发(用户访问项目)
基于百度飞浆平台(EasyDL)设计的人脸识别考勤系统
第3章业务功能开发(安全退出)
Use onedns to perfectly solve the optimization problem of office network
Please insert the disk into "U disk (H)" & unable to access the disk structure is damaged and cannot be read
TabHOST 选项卡的功能和用法
TaffyDB开源的JS数据库
随机推荐
TaffyDB开源的JS数据库
Functions and usage of serachview
Enum + Validation 的个人最佳实践 demo 分享
TabHOST 选项卡的功能和用法
[distributed theory] (I) distributed transactions
【网络攻防原理与技术】第5章:拒绝服务攻击
【TPM2.0原理及应用指南】 1-3章
redis主从、哨兵主备切换搭建一步一步图解实现
基于RGB图像阈值分割并利用滑动调节阈值
datepicket和timepicket,日期、时间选择器的功能和用法
[tpm2.0 principle and Application guide] Chapter 1-3
zdog.js火箭转向动画js特效
Audio Device Strategy 音频设备输出、输入 选择 基于7.0 代码
Ratingbar的功能和用法
本周小贴士#134:make_unique与私有构造函数
数字化转型的主要工作
深入浅出【机器学习之线性回归】
Lex & yacc of Pisa proxy SQL parsing
MRS离线数据分析:通过Flink作业处理OBS数据
Please insert the disk into "U disk (H)" & unable to access the disk structure is damaged and cannot be read