CLIP icon indicating copy to clipboard operation
CLIP copied to clipboard

Linear prob evaluation on ImageNet

Open vtddggg opened this issue 3 years ago • 4 comments

Thanks for your wonderful work!

I have some questions about linear prob evaluation on ImageNet:

  1. how do you conduct linear prob evaluation on ImageNet? using sklearn.linear_model.LogisticRegression or finetuning fc layer like this script
  2. if answer of 1) is Yes. I found do LogisticRegression on ImageNet is very costly. Can I ask for your time spend on ImageNet linear prob evaluation experiment ?

vtddggg avatar Dec 27 '21 07:12 vtddggg

Hi,

  1. Yes, but we later found that a PyTorch version can work as equivalently on linear probes.
  2. Please see https://github.com/openai/CLIP/issues/64#issuecomment-804444364 for more details

jongwook avatar Apr 11 '22 02:04 jongwook

a PyTorch version can work as equivalently on linear probes. Hi @jongwook , could you share the details or script for the PyTorch version? Thanks.

mingtan2 avatar Aug 30 '22 19:08 mingtan2

Did you found the equivalently pytorch verson?

jyuan1118 avatar Mar 27 '23 23:03 jyuan1118

These both worked well for us:

  • PyTorch's stock LBFGS: https://pytorch.org/docs/stable/generated/torch.optim.LBFGS.html
  • A third-party implementation that has more features: https://github.com/hjmshi/PyTorch-LBFGS

jongwook avatar Apr 11 '23 23:04 jongwook