I have two pretrained models, namely, model1 and model2.
lets say i have conv1 weights that are in model1 and conv2 that are in model2.
In order to load the weights of conv1 and conv2, can i do the following?
load_name = os.path.join('model1.pth')
checkpoint = torch.load(load_name)
model.load_state_dict(checkpoint['model'], strict=False)

load_name = os.path.join('model2.pth')
checkpoint = torch.load(load_name)
model.load_state_dict(checkpoint['model'], strict=False)