Important
NeMo 2.0 is an experimental feature and currently released in the dev container only:
nvcr.io/nvidia/nemo:dev. Please refer to NeMo 2.0 overview for information on getting started.
Evaluation
For CLIP models, our evaluation script calculates zero-shot ImageNet 1K validation accuracy.
To enable the evaluation stage with a CLIP model, configure the configuration files:
In the
defaultssection ofconf/config.yaml, update theevaluationfield to point to the desired CLIP configuration file. For example, if you want to use theclip/imagenet_zeroshotconfiguration, change theevaluationfield toclip/imagenet_zeroshot.defaults: - evaluation: clip/imagenet_zeroshot ...
In the
stagesfield ofconf/config.yaml, make sure theevaluationstage is included. For example,stages: - evaluation ...
Configure
imagenet_valfield ofconf/evaluation/clip/imagenet_zeroshot.yamlto be the ImageNet 1K validation folder.
Remarks:
To load a pretrained checkpoint for inference, set the
restore_from_pathfield in themodelsection to the path of the pretrained checkpoint in.nemoformat inconf/evaluation/clip/imagenet_zeroshot.yaml. By default, this field links to the.nemoformat checkpoint located in the CLIP trainning checkpoints folder.