stared / livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
https://p.migdal.pl/livelossplot
MIT License
1.29k stars 142 forks source link

Add support for other series than just training and validation #46

Closed sebastienlange closed 5 years ago

sebastienlange commented 5 years ago

Hi there!

LiveLossPlot is great!

While using it. I did not see that my classification algorithm (3 classes) was rarely predicting class_1. So having the possibility to add series would have been useful for me. For example val_class_1_accuracy, val_class2_accuracy, val_class3_accuracy.

And finally I did it. Check examples/minimal.ipynb to understand what I did!

sebastienlange commented 5 years ago

By the way, the code is generic for any serie, including validation (after having removed validation code in draw_plot) PlotLosses(seriesfmt={'validation':'val{}', 'validation class 1': 'valclass1{}', 'validation class 2': 'valclass2{}'})

And with a little effort, it should be generic with training serie as well

sebastienlange commented 5 years ago

Now the code is generic. Training and validation included. And it is backward compatible.

stared commented 5 years ago

@sebastienlange Makes sense, thanks for contributing! Two things I am not sure about:

sebastienlange commented 5 years ago

@stared There was a bug with plot order. It is now fixed with my last commit. I don't think there are any other backward compatibility issue.