Skip to content

Commit

Permalink
Convert tensor dtype to float64
Browse files Browse the repository at this point in the history
Signed-off-by: Christina Xu <[email protected]>
  • Loading branch information
christinaexyou committed Sep 4, 2024
1 parent a55b72e commit 9362c04
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 9362c04

Please sign in to comment.