Skip to content

Commit

Permalink
trying to get around a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasquale Minervini committed Oct 25, 2017
1 parent ac29ec2 commit 9121c63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jack/util/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def apply_metrics(self, tensors: Mapping[TensorPort, np.ndarray]) -> Mapping[str
predictions = tensors[Ports.Prediction.candidate_index]

acc_exact = np.sum(np.equal(labels, predictions))
acc_f1 = f1_score(labels, predictions, average='macro') * labels.shape[0]
acc_f1 = f1_score(np.array(labels), np.array(predictions), average='macro') * labels.shape[0]

return {"F1_macro": acc_f1, "Accuracy": acc_exact}

Expand Down

0 comments on commit 9121c63

Please sign in to comment.