Skip to content

Commit 06a925c

Browse files
authored
fix: fix code block rendering problem in Using models from Hub (#8846)
1 parent d3beb52 commit 06a925c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/source/models.rst

+5-1
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)