Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others

License

NotificationsYou must be signed in to change notification settings

stared/livelossplot

Repository files navigation

livelossplot version - PyPIPyPI statusMIT license - PyPIPython version - PyPIGitHub ActionsGitHub Actions: IntegrationsGitHub Actions: LintingDownloadsTwitter @pmigdal

Don'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 Notebook forKeras,PyTorch and other frameworks. An open-source Python package byPiotr Migdał,Bartłomiej Olechno andothers.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)

Animated fig for livelossplot tracking log-loss and accuracy

  • (The most FA)Q: Why not TensorBoard?
  • A: Jupyter Notebook compatibility (for exploration and teaching). The simplicity of use.

Installation

To installthis version from PyPI, type:

pip install livelossplot

To get the newest one from this repo (note that we are in the alpha stage, so there may be frequent updates), type:

pip install git+git://github.com/stared/livelossplot.git

Examples

Look at notebook files with full workingexamples:

Yourun examples in Colab.

Overview

Text 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, usinglivelossplot as a plug&play component

from livelossplot import ...

PlotLosses for 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, etc

There 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 custommatplotlib plots inlivelossplot.outputs.matplotlib_subplots you can pass inMatplotlibPlot arguments.

If you like to plot withBokeh instead ofmatplotlib, use

plotlosses = PlotLosses(outputs=[BokehPlot()])

Sponsors

This 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ój forGearShift - building the engine of behavior of wheeled motor vehicles and map’s generation based on artificial intelligence algorithms implemented on the Unreal Engine platform lead by ECC Games (NCBR grant GameINN).

Trivia

It 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.

Todo

If you want more functionality - open anIssue or even better - prepare aPull Request.

About

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors15


[8]ページ先頭

©2009-2025 Movatter.jp