A depthwise convolution gives each input channel its own k × k filter and doesn't mix channels. A pointwise (1 × 1) convolution then mixes channels at each position. Together they approximate a full convolution with far fewer parameters and FLOPs (MobileNet).
For x: (N, C, H, W), stride 1 and zero padding pad:
depthwise_conv(x, W, b, pad=0) with W: (C, k, k) and b: (C,), returning (N, C, H + 2pad - k + 1, W + 2pad - k + 1)pointwise_conv(x, W, b) with W: (F, C) and b: (F,)flops_ratio(C, F, k): multiply-accumulates of depthwise + pointwise divided by those of a standard k × k convolution, per output position: