The pre-trained model is loaded as a OrderedDict by calling torch.load(), you can then extract weights from the dictionary and do what you want. For example, in your case, you could get your model’s state_dict, then assign weights to layers of interests and load the dict using model.load_state_dict().