facebookresearch/jepa

KeyError when running evals.main

JPerAsperaadAstra opened this issue · 1 comments

Thanks for your brilliant work! Having downloaded K400 pretrained checkpoint file(k400-probe.pth.tar) and modified the config yaml file for the corresponding dataset(specifying datapath), I ran evals.main, and got the KeyError saying: jepa/evals/video_classification_frozen/eval.py", line 424, in load_pretrained
pretrained_dict = checkpoint[checkpoint_key]
KeyError: 'target_encoder
Then I print the keys in checkpoint, and get the following keys:
keys in ckpt: ['classifier', 'opt', 'scaler', 'epoch', 'batch_size', 'world_size', 'lr']
It seems that there's no key named "target_encoder". What's the reason behind this error?
Looking forward to your reply

I think you get this issue mainly because you load the wrong checkpoint. To run this script, you need to set the checkpoint as the pretrained backbone in config file instead of loading attentive probing head.