Skip to content

Commit

Permalink
url
Browse files Browse the repository at this point in the history
  • Loading branch information
roatienza committed May 3, 2021
1 parent 0eb22c2 commit 61fde10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test(opt):
print('loading pretrained model from %s' % opt.saved_model)

if validators.url(opt.saved_model):
model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=True, map_location=device))
model.load_state_dict(torch.hub.load_state_dict_from_url(opt.saved_model, progress=True, map_location=device))
else:
model.load_state_dict(torch.load(opt.saved_model, map_location=device))
opt.exp_name = '_'.join(opt.saved_model.split('/')[1:])
Expand Down

0 comments on commit 61fde10

Please sign in to comment.