当前位置:网站首页>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 .
边栏推荐
- Introduction to PC mall module of e-commerce system
- 达梦数据库_常用命令
- 数据归一化
- [vSphere high availability] handling after host failure or isolation
- 统计信号处理小作业——瑞利分布噪声中确定性直流信号的检测
- 《统计学习方法(第2版)》李航 第14章 聚类方法 思维导图笔记 及 课后习题答案(步骤详细) k-均值 层次聚类 第十四章
- How to quickly recover data after MySQL misoperation
- Read "Enlightenment: a 20-year career experience of an IT executive"
- Unknown collation: ‘utf8mb4_ 0900_ ai_ Solution of CI '
- 【activiti】个人任务
猜你喜欢

《统计学习方法(第2版)》李航 第16章 主成分分析 PCA 思维导图笔记 及 课后习题答案(步骤详细)PCA 矩阵奇异值 第十六章

Multi merchant mall system function disassembly lesson 03 - platform side merchant management

【activiti】个人任务

多商户商城系统功能拆解03讲-平台端商家管理

《机器学习》(周志华) 第5章 神经网络 学习心得 笔记

达梦数据库_DISQL下各种连接数据库的方法和执行SQL、脚本的方法
![Brief introduction of [data mining] cluster analysis](/img/9b/3484cf1353686d38dcf32e845b1903.jpg)
Brief introduction of [data mining] cluster analysis

‘Results do not correspond to current coco set‘

【activiti】网关

多商户商城系统功能拆解04讲-平台端商家入驻
随机推荐
[activiti] Introduction to activiti
Zotero快速上手指南
[data mining] zero foundation entry decision tree
多商户商城系统功能拆解08讲-平台端商品分类
达梦数据库_LENGTH_IN_CHAR和CHARSET的影响情况
测试数据增强后标签和数据集是否对应
多商户商城系统功能拆解04讲-平台端商家入驻
在网络中添加SE通道注意力模块
程序员常说的API是什么意思?API类型有什么呢?
++cnt1[s1.charAt(i) - ‘a‘];
找数组中出现次数最多的数
自己的一点点小想法——使用MATLAB实现类似环形缓冲器的读取
多商户商城系统功能拆解11讲-平台端商品栏目
Multi merchant mall system function disassembly Lecture 11 - platform side commodity column
【mycat】mycat搭建读写分离
数据归一化
Sqlserver completely deleted
【activiti】流程变量
Official account development custom menu and server configuration are enabled at the same time
删除分类网络预训练权重的的head部分的权重以及修改权重名称