Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Netron

📅 2019-May-09 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ netron, visualization ⬩ 📚 Archive

Visualizing deep learning models has become a difficult task with the explosion of Deep Learning frameworks and formats used to store trained models. Some frameworks ship with their own visualization tool and many do not. For people working with multiple frameworks, this means learning and using different tools for the same task. Netscope is a great in-browser visualizer, but it only works for prototxt files.

Netron aims to solve this problem by being a model visualization tool that supports all DL frameworks and model formats. All the important ones that I care were found to be supported: Caffe prototxt, TensorFlow protobuf and ONNX.

On Linux

$ python3 -m pip install --user netron
$ netron -b foobar.pb
$ netron -b foobar.prototxt
$ netron -b foobar.onnx

Note: This works even from within WSL-Ubuntu! Running this command opened a new tab in my browser pointing to localhost:8080.

$ netron -b --host 127.0.0.1 foobar.onnx

On Windows

Windows installers are available for every release. For example see v4.4.2. Once installed Netron associates itself with the various DL model formats, such as .onnx, so that you can double-click to open them. You can also invoke Netron from the Start menu and then open any model file you want.