A great visualization python library used to work with Keras. It uses python's graphviz library to create a presentable graph of the neural network you are building.
- Download the
ann_visualizer
folder from the github repository. - Place the
ann_visualizer
folder in the same directory as your main python script.
Use the following command:
pip install ann_visualizer
from ann_visualizer.visualize import ann_viz;
#Build your model here
ann_viz(model)
model
- The Keras Sequential modelview
- If True, it opens the graph preview after executedfilename
- Where to save the graph. (.gv file format)title
- A title for the graph
import keras;
from keras.models import Sequential;
from keras.layers import Dense;
network = Sequential();
#Hidden Layer#1
network.add(Dense(units=6,
activation='relu',
kernel_initializer='uniform',
input_dim=11));
#Hidden Layer#2
network.add(Dense(units=6,
activation='relu',
kernel_initializer='uniform'));
#Exit Layer
network.add(Dense(units=1,
activation='sigmoid',
kernel_initializer='uniform'));
from ann_visualizer.visualize import ann_viz;
ann_viz(network, title="");
This library is still unstable. Please report all bug to the issues section. It is currently tested with python3.5
, but it should run just fine on any python3.