Open tom99763 opened 4 months ago
Hi,
Sorry for the late reply. For the zero-shot inference of CLIPN, you should run src/zero_shot_infer.py. We re-define the inference model in /src/classification.py. In short, the text encoder and 'no' text encoder are defined as two classifiers.
In train_one_epoch function, your model outputs 4 variables (image_features, text_features, text_features_no, logit_scale). However, in evaluate function, your model outputs only 3 variables without text_features_no. This is quite strange because you training text enocder no but do not use it during evaluation.