kdevoe commited on
Commit
01c9468
1 Parent(s): e6560a9

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -0
inference.py CHANGED
@@ -29,6 +29,7 @@ def inference(input_text):
29
  model.eval()
30
  input = tokenizer(input_text)
31
  input_ids = torch.Tensor(input['input_ids'])
 
32
  print(input_ids)
33
  mask = torch.Tensor(input['attention_mask'])
34
  output = model(input_ids, mask)
 
29
  model.eval()
30
  input = tokenizer(input_text)
31
  input_ids = torch.Tensor(input['input_ids'])
32
+ input_ids.resize_(1,len(input_ids))
33
  print(input_ids)
34
  mask = torch.Tensor(input['attention_mask'])
35
  output = model(input_ids, mask)