A Keras Model Visualizer
Project description
Keras Visualizer
a python library for visualizing keras models.
Dependencies
- keras
- graphviz
pip3 install keras
pip3 install graphvis
Installation
Use the package manager pip to install Keras Visualizer.
pip3 install keras_visualizer
Usage
from keras_visualizer import visualizer
visualizer(model) # save model
visualizer(model, format='png') # save model and png file for visualizing model
Parameters
visualizer(model, filename='graph', title='Neural Network', format=None, view=False)
-
model: a Keras model instance.
-
filename: where to save the visualization.
-
title: A title for the graph.
-
format: file format to save 'pdf', 'png'.
-
view: open file after process if True.
-
change format to 'png' or 'pdf' to save visualization file
Example
from keras import models, layers
from keras_visualizer import visualizer
model = models.Sequential([
layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 3)),
layers.MaxPooling2D((2, 2)),
layers.Flatten(),
layers.Dense(10, activation='relu'),
layers.Dense(5, activation='softmax'),
layers.Dense(7, activation='sigmoid')])
visualizer(model, format='png', view=True)
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
keras_visualizer-2.2.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for keras_visualizer-2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb4b8978c91119f7560051c1a99e506b787b01714d2c1c9ee59df44e6201f2ce |
|
MD5 | 4902bba5be054d93af315b29a308db5e |
|
BLAKE2b-256 | a4d495e5e2815cd3d01a0ff29710b948df5cc0fe054001a70bd47d0cdfcad37e |