I’ve changed the number of input channels in DeepLabV3, because I have NRGB image (N=NIR=Near infrared), the next step is I have to duplicate the weights for the Red channel to make the model be fully pre-trained.
It will repeat the first channel and reuse the others.
Note that you have a different kernel shape and padding in your code than the original first conv layer.