1. separable convolution
将逐点卷积和逐通道卷积分开。
逐点卷积:有几张特征图就有几个卷积核
逐通道卷积:单独通道卷积
2. residual bottleneck
ResNet
3. channel shuffling
def channel_shuffle(x, groups):
batchsize, num_channels, height, width = x.size()
channels_per_group = num_channels // groups
# reshape: b, num_channels, h, w --> b, groups, channels_per_group, h, w
x = x.view(batchsize, groups, channels_per_group, height, width)
# channelshuffle
x = torch.transpose(x, 1, 2).contiguous()
# flatten
x = x.view(batchsize, -1, height, width)
return x
4. structural re-parameterization 结构重参数化
首先将 3X3,1X1和identity全部变成3X3卷积(1X1卷积周边补0)
然后将这三个及逆行相加,得到新的3X3卷积,这样就可以得到使用一个3X3卷积表示。