Deep Learning and Machine Learning Models Visualization

Avkash Chauhan
3 min readSep 13, 2019

--

After you complete the process of building your deep learning or machine learning model, you may want to understand it thoroughly before applying it into your inference operation.

To visualize your neural network, deep learning, and machine learning models, you just need Netron (Created by Lutz Roeder). Netron model visualization application has execution support for OSX, Linux and Windows OS. Also, you can try the web version of the application as well.

The very best aspect about Netron is that it is developed as open-source and its full code is available at GitHub so if interested, you can explore the code and learn about it.

Netron supports the following model formats:

  • ONNX (.onnx, .pb, .pbtxt)
  • Keras (.h5, .keras)
  • Core ML (.mlmodel)
  • Caffe (.caffemodel, .prototxt)
  • Caffe2 (predict_net.pb, predict_net.pbtxt)
  • MXNet (.model, -symbol.json)
  • TorchScript (.pt, .pth)
  • NCNN (.param)
  • TensorFlow Lite (.tflite).

Besides above, Netron also has experimental support for the following types of ML and DL models:

  • PyTorch (.pt, .pth)
  • Torch (.t7)
  • CNTK (.model, .cntk)
  • Deeplearning4j (.zip)
  • PaddlePaddle (.zip, __model__)
  • Darknet (.cfg)
  • scikit-learn (.pkl)
  • TensorFlow.js (model.json, .pb)
  • TensorFlow (.pb, .meta, .pbtxt).

You can download Netron from here. You can download Netron for OSX, Windows, Linux OS as well as use the web version as well for your model visualization.

ONNX Models:

A collection of various ONNX models is available here which you can review and download as needed. Few key models of different types are listed below which you can directly download to experimentation:

Few other models you can download from here for your experimentation:

Once Netron is downloaded installed, you can open/load your model directly into the Netron UI. following are few model views of various types:

ONNX YOLO v3 model view:

The model view of ONNX YOLO v3 Model (yolov3.onnx)

Tiny Darknet (tiny-darknet.cfg) model view:

The model view of the Darknet Model: (Tiny-Darknet.cfg)

CoreML Faces Model model view:

The model view of the CoreML Model: (faces_model.mlmodel)

Scikit-learn model:

The model view of the Scikit- Model: (diabetes_model.pkl)

Note: When saving the scikit-learn model please save it with extension .pkl to load with Netron.

@avkashchauhan | LinkedIn

--

--

No responses yet