Visualization Tool
Overview
Netron is a neural network model visualization tool developed based on the Electron platform. It supports the visualization of many mainstream AI framework models and supports multiple platforms (such as Mac, Windows, and Linux). Netron supports MindSpore Lite models, allowing you to easily view model information. As shown in the following figure, after the .ms model is loaded using Netron, the topology structure, diagram, and node information of the model are displayed.

Functions
Load the
.msmodels. The MindSpore version must be 1.2.0 or later.Display subgraphs.
Display the topology structure and data flow
shape.Display the
format,input, andoutputof a model.Display the
type,name,attribute,input, andoutputof a node.Display and save structured data such as
weightandbias.Export the visualization result as an image.
Usage
The code that supports the MS model has been merged into the official repository. The Netron is downloaded from https://github.com/lutzroeder/netron/releases/latest. The author may update the releases from time to time. After Netron is installed as follows, you can drag a model to the window to open it.
macOS: Download the
.dmgfile or run thebrew cask install netroncommand.Linux: Download the
.AppImagefile or run thesnap install netroncommand.Windows: Download the
.exefile or run thewinget install netroncommand.Python server: Run the
pip install netroncommand to install Netron, and then run thenetron [FILE]ornetron.start('[FILE]')command to load a model.Browser: Open https://netron.app/.
Development and Debugging
Using the Development Version
Step 1: Use git clone https://github.com/lutzroeder/netron to clone and obtain a copy of the source code.
Step 2: Go to the netron directory and run the npm install command.
Step 3: Run the make build command for build and generate an executable program in the ./dist directory.
Debugging a Model Using Javascript
When debugging a model, add the information about the model to be debugged to the ./test/models.json file in the netron folder, and then use the node.js file to debug the ./test/model.js script.
