I’m not sure I understand the issue.
It seems you are creating a resnet50 inside your model without the pretrained weigths.
If you want the pretrained model, you have to pass pretrained=True to the instantiation:
resnet50 = torchvision.models.resnet50(pretrained=True)