wi-lab commited on
Commit
f9ab6ed
·
verified ·
1 Parent(s): fe740e9

Update train.py

Browse files
Files changed (1) hide show
  1. train.py +1 -1
train.py CHANGED
@@ -420,7 +420,7 @@ def finetune(
420
  # Compute F1-score for classification tasks
421
  f1 = None
422
  if task_type == "classification":
423
- f1 = f1_score(all_targets, all_preds, average="macro")
424
  print(f"Epoch {epoch + 1}, Validation F1-Score: {f1:.4f}")
425
  f1_scores.append(f1)
426
 
 
420
  # Compute F1-score for classification tasks
421
  f1 = None
422
  if task_type == "classification":
423
+ f1 = f1_score(all_targets, all_preds, average="weighted")
424
  print(f"Epoch {epoch + 1}, Validation F1-Score: {f1:.4f}")
425
  f1_scores.append(f1)
426