当前位置:网站首页>Add se channel attention module to the network
Add se channel attention module to the network
2022-07-24 05:49:00 【Hehai CV chicken with vegetables】
First step : First, in the network structure py Add SELayer This class
class SELayer(nn.Module):
def __init__(self, channel, reduction=16):
super(SELayer, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.fc = nn.Sequential(
nn.Linear(channel, channel // reduction, bias=False),
nn.ReLU(inplace=True),
nn.Linear(channel // reduction, channel, bias=False),
nn.Sigmoid()
)
def forward(self, x):
b, c, _, _ = x.size()
y = self.avg_pool(x).view(b, c)
y = self.fc(y).view(b, c, 1, 1)
return x * y.expand_as(x)The second step :

On the Internet body Class SE Module properties .
Be careful : This 75 Is the number to be modified , For example, I use it here yolov3, It uses voc Data sets , So this should be 3*(4+1+20)=75. If it is two categories, it should be changed to 3*(4+1+2)=21.
The third step :

At the end of the network output Place to use SE modular .
effect :


voc After the data set is used once map Promoted 0.86.


Own a very simple data set map Can also be improved .
边栏推荐
猜你喜欢

‘Results do not correspond to current coco set‘
![Brief introduction of [data mining] cluster analysis](/img/9b/3484cf1353686d38dcf32e845b1903.jpg)
Brief introduction of [data mining] cluster analysis

达梦数据库_DISQL下各种连接数据库的方法和执行SQL、脚本的方法

Multi merchant mall system function disassembly lecture 05 - main business categories of platform merchants

【mycat】mycat配置文件

spark 广播变量和累加器使用和原理
![OSError: [WinError 127] 找不到指定的程序。Error loading “caffe2_detectron_ops.dll“ or one of its dependencies](/img/1d/4c9924c20f697011f0e9cda6616c12.png)
OSError: [WinError 127] 找不到指定的程序。Error loading “caffe2_detectron_ops.dll“ or one of its dependencies

《统计学习方法(第2版)》李航 第14章 聚类方法 思维导图笔记 及 课后习题答案(步骤详细) k-均值 层次聚类 第十四章

The female colleague of the company asked me to go to her residence to repair the computer at 11 o'clock at night. It turned out that disk C was popular. Look at my move to fix the female colleague's

《统计学习方法(第2版)》李航 第15章 奇异值分解 SVD 思维导图笔记 及 课后习题答案(步骤详细)SVD 矩阵奇异值 十五章
随机推荐
SSM项目配置中问题,各种依赖等(个人使用)
Flink format series (1) -json
电商系统PC商城模块介绍
达梦数据库_LENGTH_IN_CHAR和CHARSET的影响情况
Inventory of well-known source code mall systems at home and abroad
Multi merchant mall system function disassembly Lecture 10 - platform end commodity units
[vSphere high availability] handling after host failure or isolation
[data mining] zero foundation entry decision tree
Syntax differences between MySQL and Oracle
多商户商城系统功能拆解03讲-平台端商家管理
目标检测带标签数据增强代码
Multi merchant mall system function disassembly lesson 03 - platform side merchant management
【activiti】activiti系统表说明
达梦数据库_dmfldr工具使用说明
[activiti] activiti introduction
Multi merchant mall system function disassembly Lecture 11 - platform side commodity column
spark 广播变量和累加器使用和原理
Multi merchant mall system function disassembly lecture 08 - platform end commodity classification
Multi merchant mall system function disassembly lecture 06 - platform side merchant settlement agreement
如何快速打通CRM系统和ERP系统,实现业务流程自动化流转