Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #246.
PR Checklist
Usage examples
From #269:
Docs
The proposed interface is well-described by the registry description, pasted below:
A
FeatureRegistry
for models. Allows you to find and load models for various learningtasks using a unified interface. Call
models()
to see a table view of available models:Which models are available depends on the loaded packages. For example, FastVision.jl adds
vision models from Metalhead to the registry. Index the registry with a model ID to get more
information about that model:
If you've selected a model, call
load
to then instantiate a model:By default,
load
loads a default version of the model without any pretrained weights.load(model)
also accepts keyword arguments that allow you to specify variants of the model andweight checkpoints that should be loaded.
Loading a checkpoint of pretrained weights:
load(entry; pretrained = true)
: Use any pretrained weights, if they are available.load(entry; checkpoint = "checkpoint-name")
: Use the weights with given name. Seeentry.checkpoints
for available checkpoints (if any).load(entry; pretrained = false)
: Don't use pretrained weightsLoading a model variant for a specific task:
load(entry; input = ImageTensor, output = OneHotLabel)
: Load a model variant matchingan input and output block.
load(entry; variant = "backbone"): Load a model variant by name. See
entry.variants` foravailable variants.