Skip to content

Commit

Permalink
fix: fix code block rendering problem in Using models from Hub (#8846)
Browse files Browse the repository at this point in the history
  • Loading branch information
GdoongMathew authored Jan 13, 2025
1 parent d3beb52 commit 06a925c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/source/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ Most pre-trained models can be accessed directly via PyTorch Hub without having
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")
weights = torch.hub.load(
"pytorch/vision",
"get_weight",
weights="ResNet50_Weights.IMAGENET1K_V2",
)
model = torch.hub.load("pytorch/vision", "resnet50", weights=weights)
You can also retrieve all the available weights of a specific model via PyTorch Hub by doing:
Expand Down

0 comments on commit 06a925c

Please sign in to comment.