lukemelas/PyTorch-Pretrained-ViT

Cannot load representation layer

arkel23 opened this issue · 0 comments

I was trying to load the whole model with pretrained=True and representation layer = True but I get an error
Further inspection by looking at the keys of the state_dict in your config.py file I noticed that there's no such weights in the state_dict for any of the models. It jumps from the transformer weights to a norm layer weights then to the fc weights. It skips the pre_logits.weight. I noticed in your Jupyter notebook it seems to be working correctly. Got any idea what could be wrong?