mlfoundations / open_clip

An open source implementation of CLIP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Model coca_ViT-B-32 not found; available models = ['RN50', 'RN50-quickgelu', 'RN101', 'RN101-quickgelu', 'RN50x4', 'RN50x16', 'RN50x64', 'ViT-B-32', 'ViT-B-32-quickgelu', 'ViT-B-16', 'ViT-L-14', 'ViT-L-14-336']

narminGhaffari opened this issue · comments

I am using the following script to train a fine-tune the coco model:

#!/bin/bash

lrs=(1e-3 1e-4 1e-5)
bzs=(128 64)

for lr in "${lrs[@]}"; do
   for bz in "${bzs[@]}"; do
      python -m training.main \
             --save-frequency 1 \
             --zeroshot-frequency 1 \
             --report-to tensorboard \
             --train-data="/train_dataset.csv" \
             --val-data="/test_dataset.csv" \
             --logs="Experiments/logs" \
             --csv-img-key 'image_path' \
             --csv-caption-key 'medical_text' \
             --warmup 200 \
             --batch-size=$bz \
             --lr=$lr \
             --wd=0.1 \
             --epochs=10 \
             --workers=8 \
             --model "coca_ViT-B-32" \
             --coca-contrastive-loss-weight 0 \
             --coca-caption-loss-weight 1 \
             --pretrained  'openai'
   done
done

However, I receive:

Model coca_ViT-B-32 not found; available models = ['RN50', 'RN50-quickgelu', 'RN101', 'RN101-quickgelu', 'RN50x4', 'RN50x16', 'RN50x64', 'ViT-B-32', 'ViT-B-32-quickgelu', 'ViT-B-16', 'ViT-L-14', 'ViT-L-14-336']

I am using open_clip version 2.24.0. Can someone please help me to solve this issue?

Hi, I think there are two issues, the --pretrained openai flag makes you load models that were pretrained by openai while coca is not one of those, at the same time I think currently coca training is broken, you can try to have a look at this PR for a fix of #710