Skip to main content

A Library for visualizing Neural Networks.

Project description

Neural Plot

PyPI version Python version Open In Colab

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

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 with grid

modelplot = ModelPlot(model=model, grid=False, connection=True, linewidth=0.1)
modelplot.show()

modelplot without grid

License

MIT

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

neuralplot-0.0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

neuralplot-0.0.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file neuralplot-0.0.3.tar.gz.

File metadata

  • Download URL: neuralplot-0.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for neuralplot-0.0.3.tar.gz
Algorithm Hash digest
SHA256 786180a8a6427e3420c2525afcda2ef09cf6978f0a8c4fd5d06ae931a14103e9
MD5 cf542b10b24acf4ed9fce09844ae4d8b
BLAKE2b-256 0e0bd9ecedbdbf1830d5de81bc7ccaf39ca13e2b1f80e6fe01b89b1a188c1555

See more details on using hashes here.

File details

Details for the file neuralplot-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: neuralplot-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for neuralplot-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ef36a75c745f21ff45f9fc7da7d1a67c1f877adfd91c18ef7b72bd013bfb78fe
MD5 75b18a5b4b069e35edc4c05136e91c93
BLAKE2b-256 f3c3fa5887701db48a3661a5720a07e9bd32c1a7d6a97cc3acfd0bc29866643b

See more details on using hashes here.

Supported by

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