Update README.md
Browse files
README.md
CHANGED
@@ -91,6 +91,7 @@ def compute_metrics(eval_preds):
|
|
91 |
probs, labels = eval_preds
|
92 |
preds = np.argmax(probs, axis=-1)
|
93 |
result = {"acc": accuracy_score(labels, preds), "mcc": matthews_corrcoef(labels, preds)}
|
|
|
94 |
|
95 |
def preprocess_logits_for_metrics(logits, labels):
|
96 |
return torch.softmax(logits, dim=-1)
|
|
|
91 |
probs, labels = eval_preds
|
92 |
preds = np.argmax(probs, axis=-1)
|
93 |
result = {"acc": accuracy_score(labels, preds), "mcc": matthews_corrcoef(labels, preds)}
|
94 |
+
return result
|
95 |
|
96 |
def preprocess_logits_for_metrics(logits, labels):
|
97 |
return torch.softmax(logits, dim=-1)
|