Shortcuts

get_model_weights

torchvision.models.get_model_weights(name: Union[Callable, str]) Type[WeightsEnum][source]

Returns the weights enum class associated to the given model.

Parameters:

name (callable or str) – The model builder function or the name under which it is registered.

Returns:

The weights enum class associated with the model.

Return type:

weights_enum (WeightsEnum)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources