How to freeze specific channels in a layer?

Freezing layers is straightforward enough, but how do I freeze specific channels in a layer?

I think this can be done manually only by zeroing your weights after loss.backward().
Check this topic: