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: