I went  here 1 , then downloaded the required model file and saved in my computer.
Then, I did -
import torchvision.models as models
import torch.nn as nn
model_path = 'Path_to_model/resnet_50.pth'
model_transfer = models.resnet50()
model_transfer = model_transfer.load_state_dict(torch.load(model_path))
print(model_transfer)

and I am getting <All keys matched successfully>
on doing this.