xnn.common.models.hub.loader#

from_pretrained: one call to load any pre-trained model.

fetch_model() turns a source (registry name, local path, URL or Zenodo DOI) into a local model directory, downloading, verifying, unpacking and converting as needed; load_pretrained() builds the model from it. Both honor cache_dir, force_download and local_files_only.

Functions

fetch_model(source, *[, cache_dir, ...])

Return a local copy of a model, downloading and converting it if needed.

from_pretrained(source, *[, wrap])

Load a pre-trained model in one call.

load_pretrained(source, *[, cache_dir, ...])

Load a pre-trained model together with its config and card.

Classes

PretrainedModel(model, config, card, cutoff, ...)

A loaded model with everything known about it.