LAION-AI / CLIP_benchmark

CLIP-like model evaluation
MIT License
623 stars 80 forks source link

AttributeError: 'JaCLIPForBenchmark' object has no attribute 'eval' #93

Open pkhk-1 opened 1 year ago

pkhk-1 commented 1 year ago

Thank you for your work. When I tried to use my own model for benchmark experiments with reference to open_clip.py, an error occurred during model.eval(). I also encountered the same error when running the ja_clip example provided in the readme.

python3 clip_benchmark/cli.py eval \ --model_type "ja_clip" \ --pretrained "rinna/japanese-cloob-vit-b-16" \ --language "jp" \ --task "zeroshot_classification" \ --dataset "imagenet1k" \ Error:

image

I used weights that are consistent with open_clip, but only replaced the .bin and config files. Can you advise me on how to properly load the weights?

mehdidc commented 1 year ago

It seems like JaCLIPForBenchmark is not an torch.nn.Module, can you maybe share your code ?