nip.scenario_base.pretrained_models.get_pretrained_model_class

nip.scenario_base.pretrained_models.get_pretrained_model_class#

nip.scenario_base.pretrained_models.get_pretrained_model_class(model_name: str, hyper_params: HyperParameters) type[PretrainedModel][source]#

Get the class for a pretrained model by name.

If the full model name is not found, it tries to find a model with the name:

f”{HF_PRETRAINED_MODELS_USER}/{model_name}_{hyper_params.dataset}”

Parameters:
  • model_name (str) – The name of the pretrained model to build

  • hyper_params (HyperParameters) – The parameters for the experiment