irow commited on
Commit
2b742ef
·
1 Parent(s): ac39382

fixed model not going to correct device

Browse files
Files changed (1) hide show
  1. inference.py +1 -0
inference.py CHANGED
@@ -32,6 +32,7 @@ class DistilBERTSent(nn.Module):
32
  def initialize(path="models/model.pt"):
33
  model = DistilBERTSent()
34
  model.load_state_dict(torch.load(path, map_location=device))
 
35
  model.eval()
36
  return model
37
 
 
32
  def initialize(path="models/model.pt"):
33
  model = DistilBERTSent()
34
  model.load_state_dict(torch.load(path, map_location=device))
35
+ model.to(device)
36
  model.eval()
37
  return model
38