pytorch-cifar100 icon indicating copy to clipboard operation
pytorch-cifar100 copied to clipboard

resnet50 accuracy is a little bit worse than resnet18

Open JiyueWang opened this issue 4 years ago • 5 comments

With three runs of resnet18, I got an average acc around 76.1. However, on resnet50, I got 76.0. Does anyone have the same problem? By the way, resnet101 work fine with acc 78.1. I think the resnet50's acc is supposed to be around 77.

JiyueWang avatar Jun 19 '20 09:06 JiyueWang

With three runs of resnet18, I got an average acc around 76.1. However, on resnet50, I got 76.0. Does anyone have the same problem? By the way, resnet101 work fine with acc 78.1. I think the resnet50's acc is supposed to be around 77.

Can you tell me what were the versions of your dependencies you used?

animesh-007 avatar Jun 20 '20 00:06 animesh-007

PyTorch 1.4.0

JiyueWang avatar Jun 20 '20 10:06 JiyueWang

PyTorch 1.4.0

I m also trying to run this with PyTorch 1.0.0 and I am not able get an exact error on resnet101. Can you tell me if you made any other changes in the files?

animesh-007 avatar Jun 20 '20 10:06 animesh-007

You need to adjust the learning rate function.

    if epoch > args.warm:
        train_scheduler.step(epoch)

to if epoch > args.warm: train_scheduler.step() print the learning rate by print('lr:{:5.4f}'.format(optimizer.param_groups[0]['lr'])) to check out

By the way, this repo's models are not carefully designed for cifar100. The author has just modified a few input layers and output FC layers. The model is still too heavy for cifar. I recommend you this repo https://github.com/junyuseu/pytorch-cifar-models the models are just like the original papers and much lighter than this repo.

JiyueWang avatar Jun 25 '20 12:06 JiyueWang

hai @JiyueWang , i can just achieve 65.67 accuracy with resnet50 under torch1.4. is there any thing i need to change except you mentioned above? thanks~

valencebond avatar Oct 02 '20 02:10 valencebond