get_weight¶
- torchvision.models.get_weight(name: str) WeightsEnum [source]¶
Gets the weights enum value by its full name. Example: “ResNet50_Weights.IMAGENET1K_V1”
Warning
The function is in Beta stage, and backward compatibility is not guaranteed.
- Parameters:
name (str) – The name of the weight enum entry.
- Returns:
The requested weight enum.
- Return type:
WeightsEnum