Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (39 sloc) 1.62 KB

NeuronBlocks Model Visualizer

In NeuronBlocks, a model visualizer is provided for visualization and configuration correctness checking, which helps users to visualize the model architecture easily during debugging.

Installation

Two libraries are needed for NeuronBlocks Model Visualizer: graphviz, web.py.

You can install them via pip:

pip install graphviz
pip install web.py==0.40.dev0

Note: For Windows, please visit Graphviz Windows Packages to download graphviz, then install it and set the PATH variable.

Usage

Model Visualizer has 2 modes:

  • Command Line Mode: View model architecture via command line.
  • Browser Mode: Firstly build a model visualizer server, then view model architecture via a browser.

Command Line Mode

View model architecture via command line mode, by running:

python get_model_graph.py --conf_path ../model_zoo/demo/conf.json --graph_path ./graph

Arguments:

--conf_path: [necessary] Path of the input JSON config file.
--graph_path: [optional, default: './graph'] Path of the ouput model graph file.

You will get two file: graph.gv and graph.gv.svg. Open graph.gv.svg, then view the model architecture.

Browser Mode

Firstly, start Model Visualizer server:

cd server/
python main.py 8080

Then, you can access a model visualizer in your browser. For Linux, visit http://<your_machine_ip>:8080 . For Windows, visit http://localhost:8080 .

Finally, input the JSON config in Config Json field, click Submit button, and get the model architecture.

You can’t perform that action at this time.