Xiyue-Wang/TransPath

Error when loading Vit_small pre-trained weights using MoCoV3

qritive-kevin opened this issue · 1 comments

Dear Dr. Xiyue Wang,

Firstly, really appreciate the impressive research work and open sourcing various SSL pre-trained weights here.
However, I faced an issue while trying to load "vit_small.pth.tar" weights with the following command line:

python get_features_mocov3.py -a vit_small

I received the following error message:

Screen Shot 2023-05-10 at 23 01 23 PM

It seems like some entry not matching with the "state_dict" from the provided vit_small weights.

I am running this code on modified timm library provided along in this repo timm==0.5.4

Thank you for your consideration and I look forward to your reply.

maybe remove model = nn.DataParallel(model).cuda()?