当前位置:网站首页>Group convolution
Group convolution
2022-07-26 20:33:00 【I am a symmetric matrix】
0、 Preface
First, let's look at ordinary convolution , use pytorch Defined as :
nn.Conv2d(in_channels=3,
out_channels=4,
kernel_size=3)

It can be abstractly expressed as , A stack is a convolution kernel , Corresponding to the above figure :
1、 Group convolution
Grouping convolution is well-known , I don't know much about , First of all, from the The figure below Let's look at the difference between ordinary convolution and block convolution ( The left figure is a general convolution , On the right is block convolution )
No matter what kind of convolution , Input characteristic graphs are 12 passageway , Input channel diagrams are 6 passageway , But the intermediate operation process is different .
Each of the small stacked blocks in the figure is a convolution kernel , For example, ordinary convolution , Input is 12 passageway , So the size of a convolution kernel is (12,k_size,k_size), Such a convolution kernel operates with input to obtain a characteristic graph . What we want is 6 Output channel , So there are 6 A convolution kernel like this , The overall size is (6,12,k_size,k_size).

In fact, no matter ordinary convolution or grouping convolution , The number of convolution kernels does not change , But the size of the convolution kernel of the block convolution becomes smaller .
It can be considered that block convolution is to cut off each convolution kernel of ordinary convolution , Cut into small convolution kernel .
For example, in deep separable convolution depthwise Convolution , It's the number of groups = Input channel = Packet convolution of output channels , The original (3,3,3) Convolution kernel of (1,3,3), That is, put each 3 The convolution kernel of the channel is cut into 1 Convolution kernel of channel , But the number of convolution kernels is still 3 individual .
2、Pytorch The implementation of the
pytorch in conv2 It's provided by group Parameters , It should be noted that , It can be seen from the picture above , Block convolution is to divide the input characteristic graph and output characteristic graph n Group , That is, the number of output channels and the number of input channels can be divided into n Group , Otherwise, an error will be reported .
For the above grouping, we use pytorch Realization :
nn.Conv2d(in_channels=12,
out_channels=6,
kernel_size=3,
groups=3)
For the picture above (depthwise Convolution ), We use pytorch Realization :
nn.Conv2d(in_channels=3,
out_channels=3,
kernel_size=3,
groups=3)
actually depthwise Convolution is the number of groups = Enter the number of channels = Special grouping convolution of the number of output channels
Reference resources
Grouping convolution Group Converlution
Depthwise Convolution and Pointwise Convolution
边栏推荐
- AI 技术,让复杂世界简单化 | TeaTalk·Online 应用实战系列第 2 期
- gospel! Wechat personal official account can be renamed!
- App uploader download and installation
- 884. 两句话中的不常见单词-哈希表
- 7.25 simulation summary
- 数组操作增,删,改,查
- Ape tutoring's technological hard power: let AI start from reading children's homework
- NVIDIA Canvas 初体验~
- 7.25模拟赛总结
- Nmap installation and use
猜你喜欢

The Sandbox 和艺术家 Alec Monopoly 达成合作

YGG cooperates with my pet hooligan, AMGI's flagship NFT project, to enter the rabbit hole

员工辞职还得赔偿公司损失?34岁机长辞职被公司索赔1066万

Week 6 Convolutional Neural Networks (CNNs)

The first training course was a perfect success (๑ㅂ•) و*

潘多尼亚精灵 VoxEdit 创作大赛

EtherCAT synchronization mode

消息队列知识点总结

Small scenes bring great improvement! Baidu PaddlePaddle easydl helps AI upgrade of manufacturing assembly line

第二章:遇到阻难!绕过WAF过滤!【SQL注入攻击】
随机推荐
内网渗透学习(二)信息收集
一层节点训练5个坐标的超简单神经网络代码
【Delphi】FMX Form的BorderStyles不同平台说明
This points to the simplest rule remember it
数组操作增,删,改,查
20220725 tree array introspection
BUU刷题记3
confd+etcd实现高可用自动发现
BUU刷题记1
5.20晚上单身狗都在哪里?
Leetcode刷题之——链表总结
BGP的基本配置和聚合
App uploader download and installation
Dio problem summary
潘多尼亚精灵 VoxEdit 创作大赛
任务二 kaggle糖尿病检测
Software testing - development test content specification (project test template)
如何优雅地赞美他人?不妨尝试下这几种方式
PSPICE 仿真石英晶体振荡电路
Solve attributeerror: module 'win32com.gen_ py. 00020813-0000-0000-C000-000000000046x0x1x9‘ has no attribu