Network visualization tools in deep learning (very lightweight)

Recommended tools: Why does netron
need to use neural network visualization tools?
When reproducing other people's models, sometimes we need to know the input and output names of a model, but sometimes the author does not tell us, we need to check by ourselves, with this tool you can clearly see the input and output names of the network Network structure. It is more lightweight than tensorboard, and supports various frameworks.

Frameworks supported by netron—corresponding models:
supported framework
support for:
ONNX (.onnx, .pb, .pbtxt),
Keras (.h5, .keras),
CoreML (.mlmodel),
Caffe2 ( predict_net.pb, predict_net .pbtxt),
MXNet (.model, -symbol.json)
TensorFlow Lite (.tflite). Experimental
support for:
Caffe (.caffemodel, .prototxt),
PyTorch (.pth),
Torch (.t7),
CNTK (.model , .cntk),
PaddlePaddle (Model),
darknet (.cfg),
scikit-Learn (the .pkl),
TensorFlow.js (model.json, .pb)
TensorFlow (.pb, .meta, .pbtxt).
above framework we You can test it: you can find the model test online

(1) Installation method 1, source code installation
Installation method: Support linux, windows, mac
View: https://github.com/lutzroeder/Netron
tool to install, it is recommended to install with pip, it is very convenient for
terminal input: pip install neutron

(2) Free installation method, online version
This is an online visualized version, as long as the model is uploaded, the structure can be generated: https://lutzroeder.github.io/netron/

(1) The process of using the source code after installation
Code:

#coding=utf8
"""
@author xuwentao
dev 2020.1.17
可视化网络的工具代码
"""
# 导入可视化工具
import netron
model_path = "/home/xuwentao/AlphaPose/models/sppe/duc_se.pth"
netron.start(model_path)

carried out:

(AlphaPose) xuwentao@xuwentao-OMEN-by-HP-Desktop-PC-880-p1xx:~/AlphaPose$ python view_model.py 
Serving '/home/xuwentao/AlphaPose/models/sppe/duc_se.pth' at http://localhost:8080

After the execution is completed, the visualization of the web page version will automatically pop up-the model is printed successfully! ! Crazy development

Insert picture description herePart of the model structure

Published 129 original articles · Like 43 · Visits 100,000+

Guess you like

Origin blog.csdn.net/nbxuwentao/article/details/104015308