models.get_model
The get_model
function provides a way to quickly download a prebuilt model for easy testing of leap-ie
.
Arguments
model_name
(str
): Name of a Torchvision or Hugging Face model.Required: Yes
Default: None
Examples:
Torchvision:
get_model('torchvision.resnet18')
Hugging Face:
get_model('nateraw/vit-age-classifier')
Returns
preprocessing_fn
The preprocessing function used on inputs for inference.
model
The model.
class_list
List of class names corresponding to the model's output classes.