Skip to content

Commit

Permalink
pretriained=False fix
Browse files Browse the repository at this point in the history
Fix for #5964
  • Loading branch information
glenn-jocher authored Dec 13, 2021
1 parent 19c56e6 commit 8f064ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
model = DetectMultiBackend(path, device=device) # download/load FP32 model
# model = models.experimental.attempt_load(path, map_location=device) # download/load FP32 model
else:
cfg = list((Path(__file__).parent / 'models').rglob(f'{path.name}.yaml'))[0] # model.yaml path
cfg = list((Path(__file__).parent / 'models').rglob(f'{path.stem}.yaml'))[0] # model.yaml path
model = Model(cfg, channels, classes) # create model
if pretrained:
ckpt = torch.load(attempt_download(path), map_location=device) # load
Expand Down

0 comments on commit 8f064ca

Please sign in to comment.