This is my first post in the fastai forum.
I’m trying to programmatically get the final results after a training run - i.e. the training loss, the validation loss and the validation error rate.
I can access the last two of these using my_learn.recorder.final_record, my_learn.recorder.values or my_learn.final_record - these all seem to return the same thing.
What I can’t find is the final training loss once the training run has finished. I’ve searched online and in these forums and looked through the documentation but to no avail.
Can someone help please
@ianhraven Welcome to the community.
When you train your model (using learn.fit or something similar), you get a table displayed with the data from each epoch.
It basically tells us the training loss, validation loss(if applicable) and the metric value over the validation set (if applicable) at the end of each epoch.
So the last row of the table will give you the training loss and/or validation loss.
Hope it helps
Thanks @PalaashAgrawal but I’m trying to get these values into variables in my program so that I can do things with them
Oh, my bad.
my_learn.recorder.final_record DOES return the final training loss too. The first element of the list is the training loss, followed by the validation loss, and then the metric values
Thanks @PalaashAgrawal, but `my_learn.recorder.final_record’ only gives me 2 things - the validation loss, and the validation error rate
Is the final value in the table (during the fit cycle) of the training loss
No - the training loss is correctly shown in the table
can we see your code? maybe I can help you better in that way!