Quick update:
So I’ve got the pretrained model working with some final layers frozen but I’m only managing to make it work with the following:
resnet = models.resnet50(pretrained=True)
resnet.conv1 = torch.nn.Conv2d(1,64, kernel_size=(7,7),stride=(2,2),padding=(3,3),bias=False)
resnet.fc = torch.nn.Linear(2048,1)

Even though in my mind the fc layer should be (512,1) but if I don’t use (2041,1) I get a size mismatch error