Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spratiher9/netplot
A ultra-lightweight 3D renderer of the Tensorflow/Keras neural network architectures
https://github.com/spratiher9/netplot
keras python visualization
Last synced: 17 days ago
JSON representation
A ultra-lightweight 3D renderer of the Tensorflow/Keras neural network architectures
- Host: GitHub
- URL: https://github.com/spratiher9/netplot
- Owner: Spratiher9
- License: mit
- Created: 2021-09-20T17:34:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-27T05:16:53.000Z (about 3 years ago)
- Last Synced: 2024-10-09T12:33:17.053Z (28 days ago)
- Topics: keras, python, visualization
- Language: Python
- Homepage:
- Size: 10.9 MB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![NETPLOT](https://github.com/Spratiher9/Netplot/blob/5a7b0807114bd858deeb99e17c893b749ab95b93/Netplot.png)
## Netplotπ [![Downloads](https://static.pepy.tech/personalized-badge/netplot?period=total&units=international_system&left_color=black&right_color=orange&left_text=PYPI%20Downloads)](https://pepy.tech/project/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](https://pypi.org/project/netplot/0.1.2/)
### How to use it
![NetPLOT DEMO Notebook](https://github.com/Spratiher9/Netplot/blob/1e16251651d4c947c7a33fd7bac2f7701d7d162b/NetPLOT_demo.gif)
### Install with Pip
```python
pip install netplot
```### Notebook Codelets
```python
from netplot import ModelPlot
import tensorflow as tf
import numpy as np
``````python
%matplotlib notebook
``````python
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)
```
```python
modelplot = ModelPlot(model=model, grid=True, connection=True, linewidth=0.1)
modelplot.show()
```
![Keras Model Summarized](https://github.com/Spratiher9/Netplot/blob/master/screenshot%20demo/model_summary.png)
![Keras Model Visualized](https://github.com/Spratiher9/Netplot/blob/master/screenshot%20demo/ModelPlot%203D%20with%20grid.png)