Skip to main content

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

Project description

Live Loss Plot

PyPI version PyPI license PyPI status Downloads

Don't train deep learning models blindfolded! Be impatient and look at each epoch of your training!

A live training loss plot in Jupyter Notebook for Keras, PyTorch and other frameworks. An open source Python package by Piotr Migdał, and others. Open for collaboration! (Some tasks are as simple as writing code docstrings, so - no excuses! :))

This project supported by: Jacek Migdał, Marek Cichy. Join the sponsors - show your ❤️ and support, and appear on the list! It will give me time and energy to work on this project.

from livelossplot.keras import PlotLossesCallback

model.fit(X_train, Y_train,
          epochs=10,
          validation_data=(X_test, Y_test),
          callbacks=[PlotLossesCallback()],
          verbose=0)

So remember, log your loss!

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

Installation

To install this verson 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 working examples:

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 - use TensorBoard or even better - Neptune - Machine Learning Lab (as it allows to compare between models, in a Kaggle leaderboard style). Or, well use tensorboard_dir="./logs" or target='neptune'. Now these are included as well!

But what if you just want to train a small model in Jupyter Notebook? Here is a way to do so, using livelossplot as a plug&play component.

It started as this gist. Since it went popular, I decided to rewrite it as a package.

Oh, an I am in general interested in data vis, see Simple 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!

...or my other data vis projects.

To do

If you want more functionality - open an Issue or even better - prepare a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livelossplot-0.4.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livelossplot-0.4.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file livelossplot-0.4.2.tar.gz.

File metadata

  • Download URL: livelossplot-0.4.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for livelossplot-0.4.2.tar.gz
Algorithm Hash digest
SHA256 9cf9c99b081ed3575d648ce260dfd6f69302ddd54f6f3d087496d2374d732eb4
MD5 91c719213932175cdfd19f64bdf5af1b
BLAKE2b-256 2b0d7abc71f0c979134d1ef905c7368c31968b3dfe4874a0f9ec6d5ca5b3bfda

See more details on using hashes here.

File details

Details for the file livelossplot-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: livelossplot-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for livelossplot-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce338dad869c1e2e35a8918bcd8334b6a7c1b8b6f9320893cff802b0a7b5da22
MD5 de01ee7b7b7b201ca8b2f02654bdf60a
BLAKE2b-256 11df67ad42757269422c0ef753e69ac64e78d5b3457bac66c85e23bbb1b08b1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page