Notice how it shows the loss for both train and valid, but only shows “accuracy” for valid:
How can I make it show “accuracy” for both train and valid?
Notice how it shows the loss for both train and valid, but only shows “accuracy” for valid:
How can I make it show “accuracy” for both train and valid?
Hi Victor,
Good Day!
You could basically inherit the Callback
class and just implement the after_train
method to compute whatever metric you like by putting the model to eval
mode and doing forward passes.
Just don’t forget to put the model back to train()
mode before you end the function definition of after_eval
. This can help you store all the metrics at the end of every epoch on both train and validation data.
However you’ll have to print out the data to the screen; I don’t know how to add it to the dataframe above but basically yeah you can print it out to have a look.
Hope this helps!
Thanks,
Vinayak.