Md. Asif Uddin
    I.11.X08

    Count channels inside each group

    shape▲▲△

    A 33 by 33 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 8/4=28/4=2 inputs. The weight shape is (12,2,3,3)(12,2,3,3), with 216216 weights and 1212 biases, or 228228 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 (16,1,3,3)(16,1,3,3), giving 144144 weights plus sixteen biases, or 160160 parameters. Two independent spatial filters are learned for each input channel; this layer still does not mix different input channels.

    Draws on