-
groups
controls the connections between inputs and outputs.in_channels
andout_channels
must both be divisible(可被整除) by groups. For example,- At
groups
=1, all inputs are convolved to all outputs. - 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. - At groups=
in_channels
, each input channel is convolved with its own set of filters, of size: ⌊ o u t _ c h a n n e l s i n _ c h a n n e l s ⌋ \left\lfloor\frac{out\_channels}{in\_channels}\right\rfloor ⌊in_channelsout_channels⌋
- At
[可分离卷积] torch.nn.conv2d 中 groups
最新推荐文章于 2024-03-10 11:22:59 发布