FedML icon indicating copy to clipboard operation
FedML copied to clipboard

Pretrained models on imagenet for cifar10 and cifar100 provided in the repo are different

Open AArchLichKing opened this issue 3 years ago • 4 comments

Hi,

Thanks for your excellent work on this excellent repo.

I came across the following questions, pretrained models on imagenet for cifar10 and cifar100 provided in the repo are different. Specifically, the following codes lead to the following output. This seems weird to me, since if they are all pretrained on ImageNet then, they should be the same?

Thanks very much for your help!!

state_dict1 = torch.load("./../../../fedml_api/model/cv/pretrained/CIFAR10/resnet56/best.pth")['state_dict']
state_dict2 = torch.load("./../../../fedml_api/model/cv/pretrained/CIFAR100/resnet56/best.pth")['state_dict']

for (k1, v1), (k2, v2) in zip(state_dict1.items(), state_dict2.items()):
    print(k1==k2, k1)
    print((v1 == v2).all())

image

AArchLichKing avatar Apr 27 '22 08:04 AArchLichKing

@AArchLichKing Hi we've released a new version of FedML framework. Could you help to reproduce this issue again? I am not sure whether it still exist.

chaoyanghe avatar Apr 30 '22 07:04 chaoyanghe

@chaoyanghe Sure, I am happy to, and that's so great that you excellent guys are keeping improving codes. But I cannot find those models, lol, can you help me locate them? :)

AArchLichKing avatar Apr 30 '22 15:04 AArchLichKing

Do you mean this? https://github.com/FedML-AI/FedML/tree/master/python/fedml/model

Probably our engineers have removed the pretrained model to accelerate the speed of github clone. Which files do you need?

For the new repo, please read through https://doc.fedml.ai

chaoyanghe avatar Apr 30 '22 18:04 chaoyanghe

I think so. So what I need is the pretrained resnet56 on ImageNet, which was originally located at './../../../fedml_api/model/cv/pretrained/CIFAR10/resnet56/best.pth'. I have searched for a while but cannot find a pretrained resnet56 on Imagenet

AArchLichKing avatar May 01 '22 15:05 AArchLichKing

@AArchLichKing I see. I guess we removed them because they are too big for the source. I think you can find such pretrained models easily at pytorch ecosystem.

chaoyanghe avatar Aug 19 '22 17:08 chaoyanghe