当前位置:网站首页>Group convolution
Group convolution
2022-07-19 03:50:00 【@BangBang】
PyTorch If you want to use block convolution , Only need nn.Conv2d When defining the network structure, specify groups that will do .
Ordinary convolution

Ordinary convolution : Suppose that channel by C i n C_{in} Cin, The convolution kernel size is kxk, Output channel by n, At this time, the number of parameters of ordinary convolution is : k ∗ k ∗ C i n ∗ n k * k * C_{in} *n k∗k∗Cin∗n
Group Convolution

Grouping convolution : Suppose the of the input characteristic matrix channel by C i n C_{in} Cin, Of input features channel Divided into g A set of , For each group channel by C i n / g C_{in}/g Cin/g, Each group corresponds to a convolution . Output per group channel by n / g n/g n/g, Finally, g Of each group channel Conduct concat after , Of the output characteristic matrix channel Still for n.
Therefore, the following convolution parameter calculation :
( k ∗ k ∗ c i n / g ∗ n / g ) ∗ g (k*k*c_{in}/g*n/g)*g (k∗k∗cin/g∗n/g)∗g= k ∗ k ∗ C i n ∗ n ∗ 1 / g k*k*C_{in}*n*1/g k∗k∗Cin∗n∗1/g
Contrast is known :
- use group The number of parameters of convolution is ordinary convolution 1 / g 1/g 1/g
- Number of groups g=C_{in}, That is, the number of groups follows our input characteristic matrix channel bring into correspondence with , And output channel n = C i n n=C_{in} n=Cin, At this point DW Convolution
边栏推荐
- GNOME-BOXES虚拟机创建安装
- Paper template format of mathematical modeling competition
- 51单片机——双字节乘以双字节
- 如何在自动化测试中使用MitmProxy获取数据返回?
- 针孔微创牙龈手术(Pinhole Gum Rejuvenation)
- HCIP第六天笔记
- 正畸学分支和工具
- Ouvrir le cvsharp d'ai pour trouver une petite image (version de cas)
- Edge detection method -- first order edge detection
- 10. Redis interview FAQ
猜你喜欢
随机推荐
【论文摘要】记录一些感兴趣的摘要和特别领域论文的方法截图。
Unity using Sqlite
【LeetCode】558. 四叉树交集
【LeetCode】745. Prefix and suffix search
Receiver operating curve
Boston house price analysis assignment summary
MySQL addition, deletion, query and modification (basic)
Bias and variance
Nature Communications
Gnome boxes virtual machine creation and installation
HRNet
Chapter II: news topic classification tasks
ResNet
L1, L2 norm
Ouvrir le cvsharp d'ai pour trouver une petite image (version de cas)
波士顿房价分析作业总结
调理肾脏常见药材食材
AcWing:第60场周赛
2022长三角数学建模:齿轮箱故障诊断
缩短饿了么tabs 组件线条宽度









