I tried to load pre-trained resnet18/50 for feature extraction for MIL. but everytime I used ‘pretrained=True’. it gave me a dead kernel. (it used to work perfectly)
I’ve tried two ways:

model = models.resnet18(pretrained = True)

image979×96 9.44 KB


state_dict = torch.hub.load_state_dict_from_url(url = ‘https://download.pytorch.org/models/resnet50-19c8e357.pth 1’, model_dir= ‘data/’, file_name = ‘resnet50.pth’)
model= models.resnet50()
model.load_state_dict(torch.load(‘data/resnet50.pth’))

image791×78 7.32 KB



Also i tried like Vgg18 it threw me the same error also. Any help would be greatly appreciated.