Skip to main content

Ultralight 3D renderer of neural network architecture for TF/Keras Models

Project description

Netplot

A ultra-lightweight 3D renderer of the Tensorflow/Keras neural network architectures. This Library is working on Matplotlib visualization for now. In future the visualization can be moved to plotly for a more interactive visual of the neural network architecture.

Note: For now the rendering is working in Jupyter only Google Colab support is in works.

For more details visit NetPlot

Install with Pip

pip install netplot

Usage guide

from netplot import ModelPlot
import tensorflow as tf
import numpy as np
%matplotlib notebook
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()

Keras Model Summarized Keras Model Visualized

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

netplot-0.1.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

netplot-0.1.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

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