Skip to content

Commit

Permalink
fix: WTF torch
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Jul 16, 2024
1 parent 115e4ab commit 4330537
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alexi/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def __init__(self, model: PathLike = DEFAULT_RNN_MODEL, device="cpu"):
self.model = RNNCRF(**self.config)
else:
self.model = RNN(**self.config)
self.model.load_state_dict(torch.load(model))
self.model.load_state_dict(torch.load(model, map_location=torch.device("cpu")))
self.model.eval()
self.model.to(device)

Expand Down

0 comments on commit 4330537

Please sign in to comment.