leap-ie
HomeDashboard
v0.0.27
v0.0.27
  • Introduction
  • Quick Start
  • Installation
  • Tutorial
  • Concepts
    • Prototypes
    • Entanglements
    • Isolations
  • Integrations
  • API Reference
    • engine.generate
    • models.get_model
Powered by GitBook
On this page
  1. API Reference

models.get_model

The get_model function provides a way to quickly download a prebuilt model for easy testing of leap-ie.

preprocessing_fn, model, class_list = get_model(model_name)

Arguments

  • model_name (str): Name of a 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.

Torchvision