Netron is an open-source tool which allows to visualize neural network, deep learning and machine learning models. Netron allows to analyze model structure and ensure it matches your expected design. It supports a variety of frameworks and model formats.
Netron is a cross-platform tool which can be installed as Desktop application. It can be downloaded from releases page of the
lutzroeder/netron repository. Choose the installer depending on your operating system (
.exe for Windows ,
.dmg for macOS,
.AppImage for Linux).
Also Netron can visualize models in the browser. In this tutorial we will show how you can install Netron as a Python server. We will create a model with Keras and TensorFlow 2.
pip install tensorflow pip install netron
from tensorflow import keras import netron model = keras.Sequential([ keras.layers.Flatten(input_shape=(28, 28)), keras.layers.Dense(128, activation='relu'), keras.layers.Dense(10, activation='softmax') ]) model.save('model.h5') netron.start('model.h5')
Then it will open the browser with visualized model. By default, a model is served at
It’s also possible to generate SVG or PNG images of the models.