Count channels inside each group
shape▲▲△A by convolution has eight input channels, twelve output channels, four groups and one bias per output channel. Give the weight shape and parameter count. Is a group count of three valid? Then count a depthwise layer with eight input channels and multiplier two.
Hint
Each output channel reads only the input channels assigned to its group.
Solution
With four groups, each output channel reads inputs. The weight shape is , with weights and biases, or parameters. Each group has two input and three output channels.
Three groups are invalid because eight is not divisible by three, even though twelve is.
Depthwise multiplier two produces sixteen output channels in eight groups. The weight shape is , giving weights plus sixteen biases, or parameters. Two independent spatial filters are learned for each input channel; this layer still does not mix different input channels.