Skip to content

Commit bbbb97e

Browse files
author
pytorchbot
committed
2025-01-13 nightly release (06a925c)
1 parent 57a978d commit bbbb97e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/source/models.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ Most pre-trained models can be accessed directly via PyTorch Hub without having
172172
model = torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2")
173173
174174
# Option 2: passing weights param as enum
175-
weights = torch.hub.load("pytorch/vision", "get_weight", weights="ResNet50_Weights.IMAGENET1K_V2")
175+
weights = torch.hub.load(
176+
"pytorch/vision",
177+
"get_weight",
178+
weights="ResNet50_Weights.IMAGENET1K_V2",
179+
)
176180
model = torch.hub.load("pytorch/vision", "resnet50", weights=weights)
177181
178182
You can also retrieve all the available weights of a specific model via PyTorch Hub by doing:

0 commit comments

Comments
 (0)