📚 The doc issue
In https://pytorch.org/vision/main/models.html#using-models-from-hub, the resulting code block on my browser looks like

, which is different from the original documents.
import torch
# Option 1: passing weights param as string
model = torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2")
# Option 2: passing weights param as enum
weights = torch.hub.load("pytorch/vision", "get_weight", weights="ResNet50_Weights.IMAGENET1K_V2") # --> this is where it looks weird on Chrome.
model = torch.hub.load("pytorch/vision", "resnet50", weights=weights)
Suggest a potential alternative/fix
Not sure if the following changes could solve the rendering problem.
# Option 2: passing weights param as enum
weights = torch.hub.load(
"pytorch/vision",
"get_weight",
weights="ResNet50_Weights.IMAGENET1K_V2",
)