Replies: 1 comment
-
Hi @anais2390 you can use the MetricLogger class to capture all the metric and loss data during training and evaluation, probably with two separate instances. These will capture the values which can then be used to fill in a csv file afterward. You can also use event handlers to trigger at the end of an epoch to record the learning rate to a data structure somewhere, something like this: opt = SomeOptimizer()
epoch_lrs=[]
...
@trainer.on(Events.EPOCH_COMPLETED)
def get_lr(engine):
epoch_lrs.append(opt.lr) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using monai librairy for segmentation and I've been looking for the cleanest way to log at each epoch:
I am using engine SupervisedTrainer and SupervisedEvaluator and the trickest part is that the output_transforms are different for loss computation (no postprocessing) and metrics computation (activation + asdiscrete).
Also I coudn't manage to get the loss values into the csv.
A typical csv file sould contain the following columns (if we use the MeanDice metric for exemple)
Epoch | MeanDice_train | MeanDice_eval | Loss_train | Loss_eval |
Thank you so much for your help.
Anaïs
Beta Was this translation helpful? Give feedback.
All reactions