facebookresearch/swav

Imagenet performance reproduction problem with swav pretrain weights in torch hub

seominseok0429 opened this issue · 5 comments

I download imagenet data through Kaggle and loaded the swav pretrained weights using the torch.hub.load method.

After that, for evaluation, we tried to evaluate the imagenet val set as a swav model. But the performance is 10% Is it possible to receive data from Kaggle?(https://www.kaggle.com/c/imagenet-object-localization-challenge)

Screen Shot 2021-07-20 at 8 12 30 PM

Hi, this is because the last fully connected layer is randomly initialized. You can find the weights of the fc layer here: https://dl.fbaipublicfiles.com/deepcluster/swav_800ep_eval_linear.pth.tar

Thank you for your kind reply. Based on your reply, I modified the code as below and it worked correctly.

Screen Shot 2021-07-20 at 11 03 26 PM

Does the weights mentioned in the table here include the projection head trained weights or are they randomly initialized like the last fc layer? If they are random then where can I find the trained weights for them. Thank you @mathildecaron31

Hi @Sreyas-108
The weights from the table do include the projection head trained weights :)

Hi, this is because the last fully connected layer is randomly initialized. You can find the weights of the fc layer here: https://dl.fbaipublicfiles.com/deepcluster/swav_800ep_eval_linear.pth.tar

Thanks @mathildecaron31 , I'm wondering if only swav_800ep_eval_linear.pth.tar is provided, where we can find other eval_linear.pth.tar like 400/200ep? Do we need to train them ourselves?