neuralplot

Neural Plot is a python library for visualizing Neural Networks. It helps to plot Keras/Tensorflow model with matplotlib backend.

MIT License

Downloads
503
Stars
7
Committers
2

Neural Plot

Neural Plot is a python library for visualizing Neural Networks. It helps to plot Keras/Tensorflow model with matplotlib backend.

https://youtu.be/CsWnmWdk5-g

Installation

Run the following to install:

$ pip install neuralplot

Example

# Importing Libraries
from neuralplot import ModelPlot
import tensorflow as tf
import numpy as np
# Uncomment while using Colab.
# %matplotlib inline 

# Uncomment while using jupyter notebook. This feature is not working in colab.
%matplotlib notebook 
#Creating Model
X_input = tf.keras.layers.Input(shape=(32,32,3))
X = tf.keras.layers.Conv2D(4, 3, activation='relu')(X_input)
X = tf.keras.layers.MaxPool2D(2,2)(X)
X = tf.keras.layers.Conv2D(16, 3, activation='relu')(X)
X = tf.keras.layers.MaxPool2D(2,2)(X)
X = tf.keras.layers.Conv2D(8, 3, activation='relu')(X)
X = tf.keras.layers.MaxPool2D(2,2)(X)
X = tf.keras.layers.Flatten()(X)
X = tf.keras.layers.Dense(10, activation='relu')(X)
X = tf.keras.layers.Dense(2, activation='softmax')(X)

model = tf.keras.models.Model(inputs=X_input, outputs=X)
modelplot = ModelPlot(model=model, grid=True, connection=True, linewidth=0.1)
modelplot.show()
modelplot = ModelPlot(model=model, grid=False, connection=True, linewidth=0.1)
modelplot.show()

License

MIT

Package Rankings
Top 18.4% on Pypi.org
Badges
Extracted from project README
PyPI version Python version PyPI license Open In Colab NeuralPlot modelplot with grid modelplot with grid
Related Projects