I’d like to save my Learner, but not just its weights.
I want to be able to call learn.recorder.plot_losses() after for instance , get top_losses, etc.
Is it possible? Because if I do learn.save() and then learn.load(), I get the following error when I try to call learn.recorder.plot_losses() :
AttributeError: ‘Learner’ object has no attribute ‘recorder’
It works, thanks @dhoa.
But i still want to be able to call any method of learn after, since i’m using a server to train, and i don’t have a visual environement (I can just download outputs from the python code). If anyone knows how to save everything (including recorder), please share with us.
In any plot, you can pass return_fig=True and then use matplotlib’s .savefig or .save function to save it locally. (I can’t 100% recall which one). It’s not quite what you’re wanting but atleast you can save the graphs.
If you want to append futur training sessions logs to your existing file, don’t forget the argument append=True. Hence, the line should look like this :