I just did that but I don’t think it is behaving exactly I intend it to behave-
model_transfer = models.resnet50()
model_transfer = model_transfer.load_state_dict(torch.load(model_path))

Now, if I print  model_transfer  then isn’t the complete architecture should come up but I am getting -
<All keys matched successfully>  and no architecture.
Also, if then just want to modify last layers using  model_transfer.fc.in_features  then it should work but instead I am getting
AttributeError: '_IncompatibleKeys' object has no attribute 'fc'