Github 项目 - Netron
作者:lutzroeder
Netron 是一个强大的神经网络、深度学习和机器学习模型可视化工具. 其支持:
- ONNX (
.onnx
,.pb
,.pbtxt
) - Keras (
.h5
,.keras
) - CoreML (
.mlmodel
) - Caffe2 (
predict_net.pb
,predict_net.pbtxt
) - MXNet (
.model
,-symbol.json
) - TensorFlow Lite (
.tflite
)
Netron 已经测试支持的深度学习框架有:
- Caffe (
.caffemodel
,.prototxt
) - PyTorch (
.pth
) - Torch (
.t7
) - CNTK (
.model
,.cntk
) - PaddlePaddle(
__model__
) - Darknet (
.cfg
) - scikit-learn (
.pkl
) - TensorFlow.js (
model.json
,.pb
) - TensorFlow (
.pb
,.meta
,.pbtxt
)
可视化效果真心赞!
1. Netron 安装
macOS: Download the .dmg
file or run brew cask install netron
Linux: Download the .AppImage
or .deb
file.
Windows: Download the .exe
installer.
Browser: Start the browser version.
Python Server: Run pip install netron
and netron -b [MODEL_FILE]
. In Python run import netron
and netron.start('model.onnx')
.
2. 下载开源模型
ONNX Models: Inception v1, Inception v2, ResNet-50, SqueezeNet
Keras Models: resnet, tiny-yolo-voc
CoreML Models: MobileNet, Places205-GoogLeNet, Inception v3
TensorFlow Lite Models: Smart Reply 1.0 , Inception v3 2016
Caffe Models: BVLC AlexNet, BVLC CaffeNet, BVLC GoogleNet
Caffe2 Models: BVLC GoogleNet, Inception v2
MXNet Models: CaffeNet, SqueezeNet v1.1
TensorFlow models: Inception v3, Inception v4, Inception 5h
3. 网络可视化
在客户端或者网页版中上传对应的模型结构文件,即可输出可视化结果.
例如,yolov3-tiny Darknet 模型结构可视化: