Closed Bala93 closed 1 year ago
ZS is the standard inference based on the openCLIP code https://github.com/mlfoundations/open_clip. We do FT using standard CE loss, just use ZS weights for initializing the linear layer rather than random init.
LP is done using LBFGS solver from sklearn (https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html). I am adding the core code (https://github.com/locuslab/FLYP/blob/main/src/models/linear_lbfgs.py) for that which might be useful to you (along with the necessary helper file https://github.com/locuslab/FLYP/blob/main/src/models/common.py). You will have to integrate and clean it with your codebase a bit for argument and data passing.
LP-FT follows from above.
Thanks
Thank you so much for your detailed reply. Will incorporate them in my code base.
May I know how did you get the results of other baselines ? If possible could you also share that?