Package: livelossplot
livelossplotDon't train deep learning models blindfolded! Be impatient and look at each epoch of your training!(RECENT CHANGES,EXAMPLES IN COLAB,API LOOKUP,CODE)A live training loss plot inJupyter NotebookforKeras,PyTorchand other frameworks. An open-source Python package byPiotr Migdał,Bartłomiej Olechnoandothers.Open for collaboration!(Some tasks are as simple as writing code docstrings, so - no excuses! :))fromlivelossplotimportPlotLossesKerasmodel.fit(X_train,Y_train,epochs=10,validation_data=(X_test,Y_test),callbacks=[PlotLossesKeras()],verbose=0)(The most FA)Q: Why not TensorBoard?A: Jupyter Notebook compatibility (for exploration and teaching). The simplicity of use.InstallationTo installthis version from PyPI, type:pipinstalllivelossplotTo get the newest one from this repo (note that we are in the alpha stage, so there may be frequent updates), type:pipinstallgit+git://github.com/stared/livelossplot.gitExamplesLook at notebook files with full workingexamples:keras.ipynb- a Keras callbackminimal.ipynb- a bare API, to use anywherebokeh.ipynb- a bare API, plots with Bokeh (open it in Colab to see the plots)pytorch.ipynb- a bare API, as applied to PyTorch2d_prediction_maps.ipynb- example of custom plots - 2d prediction maps (0.4.1+)poutyne.ipynb- a Poutyne callback (Poutyneis a Keras-like framework for PyTorch)torchbearer.ipynb- an example using the built in functionality from torchbearer (torchbeareris a model fitting library for PyTorch)neptune.pyandneptune.ipynb- aNeptune.AImatplotlib.ipynb- a Matplotlib output examplevarious_options.ipynb- an extended API for metrics grouping and custom outputsYourun examples in Colab.OverviewText logs are easy, but it's easy to miss the most crucial information: is it learning, doing nothing or overfitting?
Visual feedback allows us to keep track of the training process. Now there is one for Jupyter.If you want to get serious - useTensorBoard, .
But what if you just want to train a small model in Jupyter Notebook? Here is a way to do so, usinglivelossplotas a plug&play componentfrom livelossplot import ...PlotLossesfor a generic API.plotlosses = PlotLosses()
plotlosses.update({'acc': 0.7, 'val_acc': 0.4, 'loss': 0.9, 'val_loss': 1.1})
plot.send()  # draw, update logs, etcThere are callbacks for common libraries and frameworks:PlotLossesKeras,PlotLossesKerasTF,PlotLossesPoutyne,PlotLossesIgnite.Feel invited to write, and contribute, your adapter.
If you want to use a bare logger, there isMainLogger.from livelossplot.outputs import ...Plots:MatplotlibPlot,BokehPlot.Loggers:ExtremaPrinter(to standard output),TensorboardLogger,TensorboardTFLogger,NeptuneLogger.To use them, initialize PlotLosses with some outputs:plotlosses = PlotLosses(outputs=[MatplotlibPlot(), TensorboardLogger()])There are custommatplotlibplots inlivelossplot.outputs.matplotlib_subplotsyou can pass inMatplotlibPlotarguments.If you like to plot withBokehinstead ofmatplotlib, useplotlosses = PlotLosses(outputs=[BokehPlot()])SponsorsThis project supported byJacek Migdał,Marek Cichy,Casper da Costa-Luis, andPiotr Zientara.Join the sponsors - show your ❤️ and support, and appear on the list! It will give me time and energy to work on this project.This project is also supported by a European programProgram Operacyjny Inteligentny RozwójforGearShift - building the engine of behavior of wheeled motor vehicles and map’s generation based on artificial intelligence algorithms implemented on the Unreal Engine platformlead by ECC Games (NCBR grant GameINN).TriviaIt started asthis gist. Since it went popular, I decided to rewrite it as a package.Oh, and I am in general interested in data vis, seeSimple diagrams of convoluted neural networks(and overview of deep learning architecture diagrams):A good diagram is worth a thousand equations — let’s create more of these!...ormy other data vis projects.TodoIf you want more functionality - open anIssueor even better - prepare aPull Request.