Skip to content

VisionBrain/realtimeplt

Repository files navigation



PyPI status Python version - PyPI GitHub Workflow Status Downloads

Installation

pip install realtimeplt

VisionBrain PyPi

realtimeplt is a Python library made by VisionBrain which foucuses on getting the Live training loss plot in Jupyter Notebook for Keras, PyTorch and TensorFlow.Our main objective is to bring the ability to visualize the data hyperparameters in real time. Animated fig for livelossplot tracking log-loss and accuracy

Most Noticeable changes:

  • Runs on the latest version of python
  • Runs on the latest version of keras
  • Runs on the latest version of pytorch
  • Runs on the latest version of tensorflow

Examples

Use

The major dependency of realtimeplt is livelossplot

%matplotlib inline

from keras.datasets import mnist
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Flatten, Dense, Activation

# raw keras
from livelossplot import PlotLossesKeras

Supported DataScience Libraries

Note*** Better results when used with Jupyter Notebook.

  • Matplotlib
  • Seaborn
  • SciPy
  • Bokeh

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

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()])

Future Goals

  • Make the library to work with any ANN network
  • Make this work with OpenCv
  • Addation features to be added: Hyperparameter Tuning

Note

realtimeplt is a faster and accurate version and had been adapted from liveplot.