几种卷积类型辨析
1 2 3 4
| conv = nn.Conv2d(in_channels=6, out_channels=6, kernel_size=1, groups=3) conv.weight.data.size()
|
一种分类方法:
几种卷积示意:(分组卷积 group_convolution;深度卷积 depthwise convolution; 全局深度卷积 global depthwise convolution)
- groups 默认值为1, 对应的是常规卷积操作
- groups > 1, 且能够同时被in_channel / out_channel整除,对应group_convolution
- groups == input_channel == out_channel , 对应depthwise convolution,为条件2的特殊情况
- 在条件3的基础上,各卷积核的 H == input_height; W == input_width, 对应为 global depthwise convolution, 为条件3的特殊情况
另一种分类方法:主要分三类:正常卷积、分组卷积、深度分离卷积