Replace resnet with pytorch implementation does not work
tianrengao opened this issue · comments
Terry Gao commented
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?
Terry Gao commented
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.
Terry Gao commented
Nvm, I figured it out. It came out with that I forgot to add l2 norm to the output of the fc layer