Skip to content

Commit

Permalink
fix(example): speech error (#1679)
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
goldenxinxing authored Dec 29, 2022
1 parent d5376a7 commit ed979e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/speech_command/sc/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _post(self, input: torch.Tensor) -> t.Tuple[t.List[int], t.List[float]]:
input = input.squeeze()
pred_value = input.argmax(-1).item()
probability_matrix = np.exp(input.tolist()).tolist()
return pred_value, probability_matrix[0]
return pred_value, probability_matrix

def _load_model(self, device):
model = M5(n_input=1, n_output=len(ALL_LABELS))
Expand Down

0 comments on commit ed979e8

Please sign in to comment.