Shortcuts

get_model_weights

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

Retuns the weights enum class associated to the given model.

Warning

The function is in Beta stage, and backward compatibility is not guaranteed.

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