Difference between f1 and valid_f1
AbdulRafay opened this issue · comments
Rafay commented
Hi,
I am calculating f1 score by passing metric in trainer
trainer = Trainer(n_gpu=args.n_gpu,
model=model,
epochs=args.epochs,
logger=logger,
criterion=BCEWithLogLoss(),
optimizer=optimizer,
lr_scheduler=lr_scheduler,
early_stopping=None,
training_monitor=train_monitor,
fp16=args.fp16,
resume_path=args.resume_path,
grad_clip=args.grad_clip,
model_checkpoint=model_checkpoint,
gradient_accumulation_steps=args.gradient_accumulation_steps,
batch_metrics=[AccuracyThresh(thresh=0.5)],
epoch_metrics=[AUC(average='micro', task_type='binary'),
MultiLabelReport(id2label=id2label), F1Score(task_type='binary', average='macro')])
in logs i can see two f1 scores like following:
there is f1 and valid_f1 score. what is the difference?
@lonePatient can you please help me understand
Weitang Liu commented
@AbdulRafay F1 is for training datasets and valid_f1 is for dev dataset
Rafay commented
great thanks