ptrblck:

groups = 6 conv = nn.Conv2d(6, 12, 3, 1, 1, groups=groups, bias=False) kernels = torch.stack(conv.weight.chunk(groups, 0)) # Reference x = torch.randn(1, 6, 24, 24) out = conv(x) # Comparison o1 = F.conv2d(x[:, :1], kernels[0], padding=1) print(torch.allclose(o1, out[:, :2]))



image.png953×676 66.3 KB

then i have no idea why…