When the number of output channels is not a multiple of the group in Conv2d

As the group in torch.nn.Conv2d said it will split channel into groups, as the example from Conv2d

At groups=2, the operation becomes equivalent to having two conv layers side by side, each seeing half the input channels, and producing half the output channels, and both subsequently concatenated.

But what will happen if the output channel is not the multiple of the groups? one of the groups will generate more output?


In the link you have provided, it says that both in_channel and out_channel must be divisible by groups.


sorry, my bad. Thank you for your patience!

1 Like