Solved by Jason_Sheen in post #5 
              
              
                Guys, I have resolved this. Here is the code I did: 
import torchvision.models as models
import torch.nn as nn
from torch.autograd import Variable
backbone = models.__dict__['densenet169'](pretrained=True)
weight1 = backbone.features.conv0.weight.clone()
new_first_layer  = nn.Conv2d(4, 64, kernel_si…