Skip to content

Commit

Permalink
Merge pull request #388 from christinaexyou/convert-tensor-dtype
Browse files Browse the repository at this point in the history
Convert tensor dtype to float64
  • Loading branch information
evaline-ju authored Sep 4, 2024
2 parents a55b72e + 9362c04 commit 97ae2bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _get_scores(self, text: Union[str, List[str]]):

softmax = torch.nn.Softmax(dim=1)
raw_scores = softmax(logits)
scores = raw_scores.numpy()
scores = raw_scores.double().numpy()
num_labels = self.model.num_labels
num_texts = 1 # str
if isinstance(text, List):
Expand Down

0 comments on commit 97ae2bf

Please sign in to comment.