I have used Keras before, and then I plotted the training and validation accuracy of datasets this way—
plt.plot(history.history['accuracy'])
plt.plot(history.history['val_accuracy'])
I'm currently learning fastai, and have already plotted training and validation losses. But I don't know how to plot validation accuracy and training accuracy.
learn.recorder.plot_losses()
Would anyone please help?
learn.recorder.plot_metrics()
will plot all the metrics that you'v specified in
learn = cnn_learner(data, models.resnet34,
metrics=[accuracy, error_rate])
Check out: https://forums.fast.ai/t/plotting-metrics-after-learning/69937/3
The function plot_metrics() by Ignacio Oguiza is detailed there. Without it, you'll get an error 'Learner' object has no attribute 'plot_metrics'
Once implemented, you can call plot_metrics() as Sirynka has mentioned:
learn.recorder.plot_metrics()
And you may get some nice charts:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With