zhirongw / lemniscate.pytorch

Unsupervised Feature Learning via Non-parametric Instance Discrimination

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace resnet with pytorch implementation does not work

tianrengao opened this issue · comments

I replaced the resnet18 with the Pytorch official implementation by net=models.resnet18(). Then the knn's accuracy does not improve while training. Does anyone know why it is this case?

I think it is probably because models.resnet18 is designed for ImageNet, but I was running on Cifar dataset. There is a mismatch between the first conv's kernel size and the image resolution.

Nvm, I figured it out. It came out with that I forgot to add l2 norm to the output of the fc layer