We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Using models from Hub
1 parent d3beb52 commit 06a925cCopy full SHA for 06a925c
docs/source/models.rst
@@ -172,7 +172,11 @@ Most pre-trained models can be accessed directly via PyTorch Hub without having
172
model = torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2")
173
174
# Option 2: passing weights param as enum
175
- weights = torch.hub.load("pytorch/vision", "get_weight", weights="ResNet50_Weights.IMAGENET1K_V2")
+ weights = torch.hub.load(
176
+ "pytorch/vision",
177
+ "get_weight",
178
+ weights="ResNet50_Weights.IMAGENET1K_V2",
179
+ )
180
model = torch.hub.load("pytorch/vision", "resnet50", weights=weights)
181
182
You can also retrieve all the available weights of a specific model via PyTorch Hub by doing:
0 commit comments