instability with prediction while using resnet 50 pretrained model
knitemblazor opened this issue · 1 comments
knitemblazor commented
import torch
model = torch.hub.load('facebookresearch/swav:main', 'resnet50')
when using this model to predict classes for image net dataset the class predictions are different for every run.
could anyone please explain why its so. And does this pretrained weights act as a better model for feature extraction of
images when compared to already existing resnet models pretrained on imagenet
the model has a final linera layer of output dim = 1000 thats why i thought its been trained for imagenet for 1000 classes.
Any help is highly appreciated
knitemblazor commented
all those looking for answer to similar problem .
Its because the last fc is randomly initialized
Hence the predictions are different for every run