当前位置:网站首页>分组卷积和深度可分离卷积
分组卷积和深度可分离卷积
2022-07-20 02:27:00 【Mick..】
分组卷积的由来
分组卷积最早开始于AlexNet,主要为了解决单个GPU无法处理含有大量计算量和存储需求的卷积层这个问题。目前,分组卷积多被用于构建用于移动设备的轻量级网络模型。例如深度可分离卷积。
pytorch中的使用方法
Conv2d(in_channels, out_channels, kernel_size, stride=1,padding=0, dilation=1, groups=1,bias=True, padding_mode=‘zeros’)
Args: in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (int or tuple): Size of the convolving kernel stride (int or tuple, optional): Stride of the convolution. Default: 1 padding (int, tuple or str, optional): Padding added to all four sides of the input. Default: 0 padding_mode (string, optional): ``'zeros'``, ``'reflect'``, ``'replicate'`` or ``'circular'``. Default: ``'zeros'`` dilation (int or tuple, optional): Spacing between kernel elements. Default: 1 groups (int, optional): Number of blocked connections from input channels to output channels. Default: 1 bias (bool, optional): If ``True``, adds a learnable bias to the output. Default: ``True``
卷积参数量的计算公式是:(输入通道数 * 输出通道数 * k^2 )/ groups
常规卷积
分两组时
分四组时
以上都是均匀分组。每个组内部和常规卷积一样,组间的特征图不可见。分组卷积可以减少参数量。
深度可分离卷积
深度可分离卷积可以分为深度卷积和逐点卷积。
深度卷积
深度卷积其实就是一种特殊的分组卷积,它的组数等于输入的特征数,即每一组都只有一个卷积核。
Depthwise Convolution完成后的Feature map数量与输入层的depth相同,但是这种运算对输入层的每个channel独立进行卷积运算后就结束了,没有有效的利用不同map在相同空间位置上的信息。因此需要增加另外一步操作来将这些map进行组合生成新的Feature map,即接下来的Pointwise Convolution
逐点卷积
逐点卷积就是卷积核大小为1*1的卷积核。
参考文献:
边栏推荐
- 中职网络安全技能大赛P100-Web渗透测试
- Redux 原理
- Shardingsphere proxy with mogdb/opengauss to realize distributed database
- Miller gingival recession and mucogingival junction
- C语言入门实战(9):完数判断
- cannot import name ‘import_ String 'from' Werkzeug '[bug resolution]
- 数据库系统原理与应用教程(036)—— MySQL 的索引(二):创建索引
- Network security comprehensive penetration test cve-2010-2883-pdf vulnerability analysis
- Dynamic memory management
- 动态内存管理
猜你喜欢
力扣343-整数分割——动态规划
Create a file. If the superior (or superior, etc.) directory of the file does not exist, create the superior directory first, and then create the file
LeetCode.1217. 玩筹码____简单贪心
PHP(1)
Tencent Chinese translation applet interface version (under study)
iMeta | ggClusterNet微生物网络分析和可视化保姆级教程
Resolved no module named 'flask_ Misaka '[bug solution]
网络安全—综合渗透测试-CVE-2018-10933-libssh维持访问
腾讯民汉翻译 小程序 改接口版(研究中)
C语言_定义结构体和使用变量
随机推荐
Tutorial on principles and applications of database system (022) -- Summary of data types supported by MySQL
力扣刷题记录2-----35.搜索插入位置
Xtrabackup realizes MySQL: full backup + incremental backup
Installation sequence of Yuhua Wanbao fan
Android开发Tencent的面试准备
Interview preparation of Tencent for Android Development
LeetCode.1217. 玩筹码____简单贪心
网络安全—综合渗透测试-CVE-2018-10933-libssh维持访问
xtrabackup实现mysql:全量备份+增量备份
Leetcode exercises grammar supplementary summary notes
Distribution rules of weights of binary neural networks
第九天(抓取流量、路由策略)
Quick sequencing and optimization
力扣279-完全平方数——动态规划
力扣刷题记录4-----69. x 的平方根
Handbrake installation problem: prompt to install frameworks NET
Unity-word文档点击按钮下载
基于hog特征的图像处理
在vscode里面使用tinymce富文本编辑器
iptables防止nmap端口扫描