You misunderstand the application of Conv2d in virtually all ML frameworks today. Each filter takes all channels as input as opposed to just one, therefore, it has CxKxK parameters. If you want to use a subset, that’s what the groups parameter is for. Then it needs to be a multiple.