Shortcuts

get_weight

torchvision.models.get_weight(name: str) WeightsEnum[source]

Gets the weights enum value by its full name. Example: “ResNet50_Weights.IMAGENET1K_V1”

Parameters:

name (str) – The name of the weight enum entry.

Returns:

The requested weight enum.

Return type:

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