Depthwise separable convolution is a depthwise convolution followed by a pointwise convolution as follows:
- Depthwise convolution is the channel-wise DK×DK spatial convolution. Suppose in the figure above, we have 5 channels, then we will have 5 DK×DK spatial convolution.
- Pointwise convolution actually is the 1×1 convolution to change the dimension.
With above operation, the operation cost is:
When DK×DK is 3×3, 8 to 9 times less computation can be achieved, but with only small reduction in accuracy.