Skip to content

Commit

Permalink
Refine Torch Load Model Path
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyliwei committed Jul 9, 2020
1 parent 82b22d0 commit 47c6723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/superglue.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def __init__(self, config):
assert self.config['weights'] in ['indoor', 'outdoor']
path = Path(__file__).parent
path = path / 'weights/superglue_{}.pth'.format(self.config['weights'])
self.load_state_dict(torch.load(path))
self.load_state_dict(torch.load(str(path)))
print('Loaded SuperGlue model (\"{}\" weights)'.format(
self.config['weights']))

Expand Down

0 comments on commit 47c6723

Please sign in to comment.