Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.34 KB

README.md

File metadata and controls

71 lines (51 loc) · 2.34 KB

Neural Plot

A Library for visualizing Neural Networks of the TensorFlow/Keras models.

Visit library page - https://github.com/Rajsoni03/neuralplot

This Library is working on Matplotlib.

This works well for smaller models but takes longer for larger models.

Currently Under Development

Try this out Open In Colab (Interactive plot is not supported in colab.)


Single Layer Graph Plotting (Development Notebooks/1-Neural Net.ipynb)

for i, c in enumerate(['r', 'g', 'b']):
    x,y,z = mat3dl(32, 32, 3, (i,i+1))
    ax.scatter(x, z, y, c=c, marker='o')
plt.show()

alt text

Multilayer Layer Graph Plotting (Development Notebooks/2-Neural Net.ipynb)

layers = [(32, 32, 3, 'rgb', '.'),(16, 16, 5, 'r', '+'),(20,20,3,'y', 's'),(5,5,5),(10,1,1,'b', '^')]
neuralplot(layers)

alt text

2D Network Plot (Development Notebooks/3-Neural Net.ipynb)

layers = [(1, 32, 1, 'b','o'),(1, 32, 1, 'r', '.'),(1, 8, 1, 'g', '.'),(1, 12, 1, 'g', '.'),(1, 4, 1, 'm', 's')]
neuralplot(layers)

alt text

Plot Simple 3D Network (Development Notebooks/3-Neural Net.ipynb)

alt text

Plot Complex 3D Networks (Development Notebooks/3-Neural Net.ipynb)

layers = [(4, 4, 3, 'rgb','s'),(2, 2, 2, 'y', 'o'),(3, 3, 3, 'g', '.'),(5, 5, 1, 'b', '.'),(2, 1, 1, 'b', '^')]
neuralplot(layers)

alt text

layers = [(8, 8, 1, 'r','o'),(4, 4, 2, 'g', '.'),(2, 2, 3, 'b', '.'),(5, 5, 2, 'y', '.'),(2, 1, 1, 'c', 's')]
neuralplot(layers)

alt text

TensorFlow/Keras Models to 3D Networks Graph (Example Notebook.ipynb)

from neuralplot import neuralplot
neuralplot(model=model, grid=True, connection=True, linewidth=0.1)

alt text

neuralplot(model=model, grid=False, connection=True, linewidth=0.1)

alt text