Skip to content

Commit 4351815

Browse files
committed
[SESSION] with-cm-logging6
1 parent 44c7885 commit 4351815

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qumia_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ def validate(trainer: QUMIA_Trainer, n_batches=None, set_type='validation', fold
156156
create_confusion_matrix(rounded_predictions.tolist(), labels.tolist(), set_type, val_output_dir)
157157

158158
# WandB confusion matrix
159-
label_list = labels.astype(int).tolist()
160-
pred_list = rounded_predictions.astype(int).tolist()
159+
label_list = [value - 1 for value in labels.astype(int)]
160+
pred_list = [value - 1 for value in rounded_predictions.astype(int)]
161161
wandb.log({"cm_" + folder: wandb.plot.confusion_matrix(probs=None,
162162
y_true=label_list, preds=pred_list,
163163
class_names=['1.0', '2.0', '3.0', '4.0'])})

0 commit comments

Comments
 (0)