Skip to content

Commit 3673716

Browse files
vfdev-5datumbox
andauthored
Fixes #3322 (#3325)
Disable pretrained backbone downloading if pretrained is True Co-authored-by: Vasilis Vryniotis <[email protected]>
1 parent 6116812 commit 3673716

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torchvision/models/segmentation/segmentation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def _segm_model(name, backbone_name, num_classes, aux, pretrained_backbone=True)
6969
def _load_model(arch_type, backbone, pretrained, progress, num_classes, aux_loss, **kwargs):
7070
if pretrained:
7171
aux_loss = True
72+
kwargs["pretrained_backbone"] = False
7273
model = _segm_model(arch_type, backbone, num_classes, aux_loss, **kwargs)
7374
if pretrained:
7475
_load_weights(model, arch_type, backbone, progress)

0 commit comments

Comments
 (0)