aehrc / cxrmate

CXRMate: Longitudinal Data and a Semantic Similarity Reward for Chest X-Ray Report Generation
https://huggingface.co/aehrc/cxrmate
Apache License 2.0
14 stars 3 forks source link

Printing out accuracy metrics during training #5

Closed AceMcAwesome77 closed 6 months ago

AceMcAwesome77 commented 10 months ago

I'm trying to recreate the training on a subset of the mimic-cxr-jpeg dataset and my output during training looks like this:

Epoch 10: 100%
TBTokenizer tokenized 2958 tokens at 43535.30 tokens per second.
PTBTokenizer tokenized 4446 tokens at 62878.10 tokens per second.
{'testlen': 2425, 'reflen': 3839, 'guess': [2425, 2365, 2305, 2245], 'correct': [1180, 456, 223, 112]}
ratio: 0.6316749153423726

Since the chexbert F1 metric is the parameter being used to decide when the final version of the model is saved during training, is there a way to print out this F1 metric after each epoch? That would give an idea for if the model is still improving, or if a bunch of epochs have gone by without any progress on validation F1. It could be interesting to print out other validation set metrics like bleu and meteor after each epoch as well.

Also, what is the "ratio" currently being printed out by the logs here? Thanks!

yihp commented 4 months ago

Hi! I have the same question, do you know the answer now?