Visualizer for neural network, deep learning, and machine learning models

Overview

Netron is a viewer for neural network, deep learning and machine learning models.

Netron supports ONNX (.onnx, .pb, .pbtxt), Keras (.h5, .keras), TensorFlow Lite (.tflite), Caffe (.caffemodel, .prototxt), Darknet (.cfg), Core ML (.mlmodel), MNN (.mnn), MXNet (.model, -symbol.json), ncnn (.param), PaddlePaddle (.zip, __model__), Caffe2 (predict_net.pb), Barracuda (.nn), Tengine (.tmfile), TNN (.tnnproto), RKNN (.rknn), MindSpore Lite (.ms), UFF (.uff).

Netron has experimental support for TensorFlow (.pb, .meta, .pbtxt, .ckpt, .index), PyTorch (.pt, .pth), TorchScript (.pt, .pth), OpenVINO (.xml), Torch (.t7), Arm NN (.armnn), BigDL (.bigdl, .model), Chainer (.npz, .h5), CNTK (.model, .cntk), Deeplearning4j (.zip), MediaPipe (.pbtxt), ML.NET (.zip), scikit-learn (.pkl), TensorFlow.js (model.json, .pb).

Install

macOS: Download the .dmg file or run brew install netron

Linux: Download the .AppImage file or run snap install netron

Windows: Download the .exe installer or run winget install netron

Browser: Start the browser version.

Python Server: Run pip install netron and netron [FILE] or netron.start('[FILE]').

Models

Sample model files to download or open using the browser version:

Comments
  • Windows app not closing properly

    Windows app not closing properly

    After the latest update, Netron remains open taking up memory and CPU after closing the program. I must close it through task manager each time. I am on Windows 10

    no repro 
    opened by idenc 22
  • TorchScript: ValueError: not enough values to unpack

    TorchScript: ValueError: not enough values to unpack

    • Netron app and version: web app 5.5.9?
    • OS and browser version: Manjaro GNOME on firefox 97.0.1

    Steps to Reproduce:

    1. use torch.broadcast_tensors
    2. export with torch.trace(...).save()
    3. open in netron.app

    I have also gotten a Unsupported function 'torch.broadcast_tensors', but have been unable to reproduce it due to this current error. Most likely, the fix for the following repro will cover two bugs.

    Please attach or link model files to reproduce the issue if necessary.

    image

    Repro:

    import torch
    
    class Test(torch.nn.Module):
        def forward(self, a, b):
            a, b = torch.broadcast_tensors(a, b)
            assert a.shape == b.shape == (3, 5)
            return a + b
    
    torch.jit.trace(
        Test(),
        (torch.ones(3, 1), torch.ones(1, 5)),
    ).save("foobar.pt")
    

    Zipped foobar.pt: foobar.zip

    help wanted bug 
    opened by pbsds 15
  • OpenVINO support

    OpenVINO support

    • [x] 1. Opening rm_lstm4f.xml results in TypeError (#192)
    • [x] 2. dot files are not opened any more - need to fix it (#192)
    • [x] 3. add preflight check for invalid xml and dot content
    • [x] 6. Add test files to ./test/models.json (#195) (#211)
    • [x] 9. Add support for the version 3 of IR (#196)
    • [x] 10. Category color support (#203)
    • [x] 11. -metadata.json for coloring, documentation and attribute default filtering (#203).
    • [x] 5. Filter attribute defaults based on -metadata.json to show fewer attributes in the graph
    • [ ] 7. Show weight tensors
    • [x] 8. Graph inputs and outputs should be exposed as Graph.inputs and Graph.outputs
    • [x] 12. Move to DOMParser
    • [x] 13. Remove dot support
    feature 
    opened by lutzroeder 15
  • RangeError: Maximum call stack size exceeded

    RangeError: Maximum call stack size exceeded

    • Netron app and version: 4.4.8 App and Browser
    • OS and browser version: Windows 10 + Chrome Version 84.0.4147.135

    Steps to Reproduce:

    EfficientDet-d0.zip

    Please attach or link model files to reproduce the issue if necessary.

    help wanted no repro bug 
    opened by ryusaeba 14
  • Debugging Tensorflow Lite Model

    Debugging Tensorflow Lite Model

    Hi there,

    First off, just wanted to say thanks for creating such a great tool - Netron is very useful.

    I'm having an issue that likely stems from Tensorflow, rather than from Netron, but thought you might have some insights. In my flow, I use TF 1.15 to go from .ckpt --> frozen .pb --> .tflite. Normally it works reasonably smoothly, but a recent run shows an issue with the .tflite file: it is created without errors, it runs, but it performs poorly. Opening it with Netron shows that the activation functions (relu6 in this case) have been removed for every layer. Opening the equivalent .pb file in Netron shows the relu6 functions are present.

    Have you seen any cases in which Netron struggled with a TF Lite model (perhaps it can open, but isn't displaying correctly)? Also, how did you figure out the format for .tflite files (perhaps knowing this would allow me to debug it more deeply)?

    Thanks in advance.

    no repro 
    opened by mm7721 12
  • add armnn serialized format support

    add armnn serialized format support

    here's patch to support armnn format. (experimental)

    armnn-schema.js is compiled from ArmnnSchema.fbs included in armNN serailizer.

    see also:

    armnn: https://github.com/ARM-software/armnn

    As mensioned in #363, I will check items in below:

    • [x] Add sample files to test/models.json and run node test/test.js armnn
    • [x] Add tools/armnn script and sync, schema to automate regenerating armnn-schema.js
    • [x] Add tools/armnn script to run as part of ./Makefile
    • [x] Run make lint
    opened by Tee0125 12
  • TorchScript: Argument names to match runtime

    TorchScript: Argument names to match runtime

    Hi, there is some questions about node's name which in pt model saved by TorchScript. I use netron to view my pt model exported by torch.jit.save(),but the node's name doesn't match with it's real name resolved by TorchScript interface. It looks like the names in pt are arranged numerically from smallest to largest,but this is clearly not the case when they are parsed from TorchScript's interface. I wonder how this kind of situation can be solved, thanks a lot !! Looking forward to your reply.

    help wanted 
    opened by daodaoawaker 11
  • Support torch.fx IR visualization using netron

    Support torch.fx IR visualization using netron

    torch.fx is a library in PyTorch 1.8 that allows python-python model transformations. It works by symbolically tracing the PyTorch model into a graph (fx.GraphModule), which can be transformed and finally exported back to code, or used as a nn.Module directly. Currently there is no mechanism to import the graph IR into netron. An indirect path is to export to ONNX to visualize, which is not as useful if debugging transformations that potentially break ONNX exportability. It seems valuable to visualize the traced graph directly in netron.

    feature help wanted no repro 
    opened by sjain-stanford 11
  • TorchScript unsupported functions in after update

    TorchScript unsupported functions in after update

    I have a lot of basic model files saved in TorchScript and they were able to be opened weeks ago. However I cannot many of them after update Netron to v3.9.1. Many common functions are not supported not, e.g. torch.constant_pad_nd, torch.bmm, torch.avg_pool3d.

    opened by lujq96 11
  • OpenVINO IR v10 LSTM support

    OpenVINO IR v10 LSTM support

    • Netron app and version: 4.4.4
    • OS and browser version: Windows 10 64bit

    Steps to Reproduce:

    1. Open OpenVINO IR XML file in netron

    Please attach or link model files to reproduce the issue if necessary.

    I cannot share the proprietary model that shows dozens of disconnected nodes, but the one linked below does show disconnected subgraphs after conversion to OpenVINO IR. Note that the IR generated using the --generate_deprecated_IR_V7 option displays correctly.

    https://github.com/ARM-software/ML-KWS-for-MCU/blob/master/Pretrained_models/Basic_LSTM/Basic_LSTM_S.pb

    Convert using:

    python 'C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo.py' --input_model .\Basic_LSTM_S.pb --input=Reshape:0 --input_shape=[1,490] --output=Output-Layer/add

    This results in the following disconnected graph display:

    image

    no repro external bug 
    opened by mdeisher 10
  • Full support for scikit-learn (joblib)

    Full support for scikit-learn (joblib)

    For recoverable estimator persistence scikit-learn recommends to use joblib (instead of pickle). Sidenote: It is possible to export trained models into ONNX or PMML but the estimators are not recoverable. For more info refer to here.

    bug 
    opened by fkromer 9
  • Export full size image

    Export full size image

    I have onnx file successfully exported from mmsegmentation (swin-transformer), huge model (975.4) MB, I managed to open it in netron, however when I try to export it and preview in full size its blured.

    Any way I can fix it ? Thanks

    no repro bug 
    opened by adrianodac 0
  • TorchScript: torch.jit.mobile.serialization support

    TorchScript: torch.jit.mobile.serialization support

    Export PyTorch model to FlatBuffers file:

    import torch
    import torchvision
    model = torchvision.models.resnet34(weights=torchvision.models.ResNet34_Weights.DEFAULT)
    torch.jit.save_jit_module_to_flatbuffer(torch.jit.script(model), 'resnet34.ff')
    

    Sample files: scriptmodule.ff.zip squeezenet1_1_traced.ff.zip

    feature 
    opened by lutzroeder 0
  • MegEngine: fix some bugs

    MegEngine: fix some bugs

    fix some bugs of megengine C++ model (.mge) visualization:

    1. show the shape of the middle tensor;
    2. fix scope matching model identifier (mgv2) due to possible leading information;

    please help review, thanks~

    opened by Ysllllll 0
  • TorchScript server

    TorchScript server

    import torch
    import torchvision
    import torch.utils.tensorboard
    model = torchvision.models.detection.fasterrcnn_resnet50_fpn()
    script = torch.jit.script(model)
    script.save('fasterrcnn_resnet50_fpn.pt')
    with torch.utils.tensorboard.SummaryWriter('log') as writer:
        writer.add_graph(script, ())
    

    fasterrcnn_resnet50_fpn.pt.zip

    feature 
    opened by lutzroeder 0
Using Random Effects to Account for High-Cardinality Categorical Features and Repeated Measures in Deep Neural Networks

LMMNN Using Random Effects to Account for High-Cardinality Categorical Features and Repeated Measures in Deep Neural Networks This is the working dire

Giora Simchoni 10 Nov 02, 2022
Multi-Horizon-Forecasting-for-Limit-Order-Books

Multi-Horizon-Forecasting-for-Limit-Order-Books This jupyter notebook is used to demonstrate our work, Multi-Horizon Forecasting for Limit Order Books

Zihao Zhang 116 Dec 23, 2022
PyTorch Lightning + Hydra. A feature-rich template for rapid, scalable and reproducible ML experimentation with best practices. ⚡🔥⚡

Lightning-Hydra-Template A clean and scalable template to kickstart your deep learning project 🚀 ⚡ 🔥 Click on Use this template to initialize new re

Łukasz Zalewski 2.1k Jan 09, 2023
Code for "Steerable Pyramid Transform Enables Robust Left Ventricle Quantification"

Code for "Steerable Pyramid Transform Enables Robust Left Ventricle Quantification" This is an end-to-end framework for accurate and robust left ventr

2 Jul 09, 2022
🤗 Transformers: State-of-the-art Natural Language Processing for Pytorch, TensorFlow, and JAX.

English | 简体中文 | 繁體中文 | 한국어 State-of-the-art Natural Language Processing for Jax, PyTorch and TensorFlow 🤗 Transformers provides thousands of pretrai

Hugging Face 77.4k Jan 05, 2023
Pytorch implementation of CoCon: A Self-Supervised Approach for Controlled Text Generation

COCON_ICLR2021 This is our Pytorch implementation of COCON. CoCon: A Self-Supervised Approach for Controlled Text Generation (ICLR 2021) Alvin Chan, Y

alvinchangw 79 Dec 18, 2022
A PyTorch implementation of "SelfGNN: Self-supervised Graph Neural Networks without explicit negative sampling"

SelfGNN A PyTorch implementation of "SelfGNN: Self-supervised Graph Neural Networks without explicit negative sampling" paper, which will appear in Th

Zekarias Tilahun 24 Jun 21, 2022
a curated list of docker-compose files prepared for testing data engineering tools, databases and open source libraries.

data-services A repository for storing various Data Engineering docker-compose files in one place. How to use it ? Set the required settings in .env f

BigData.IR 525 Dec 03, 2022
Reference implementation of code generation projects from Facebook AI Research. General toolkit to apply machine learning to code, from dataset creation to model training and evaluation. Comes with pretrained models.

This repository is a toolkit to do machine learning for programming languages. It implements tokenization, dataset preprocessing, model training and m

Facebook Research 408 Jan 01, 2023
BlueFog Tutorials

BlueFog Tutorials Welcome to the BlueFog tutorials! In this repository, we've put together a collection of awesome Jupyter notebooks. These notebooks

4 Oct 27, 2021
Implementations of orthogonal and semi-orthogonal convolutions in the Fourier domain with applications to adversarial robustness

Orthogonalizing Convolutional Layers with the Cayley Transform This repository contains implementations and source code to reproduce experiments for t

CMU Locus Lab 36 Dec 30, 2022
A python package for generating, analyzing and visualizing building shadows

pybdshadow Introduction pybdshadow is a python package for generating, analyzing and visualizing building shadows from large scale building geographic

Qing Yu 13 Nov 30, 2022
Pytorch implementation of Decoupled Spatial-Temporal Transformer for Video Inpainting

Decoupled Spatial-Temporal Transformer for Video Inpainting By Rui Liu, Hanming Deng, Yangyi Huang, Xiaoyu Shi, Lewei Lu, Wenxiu Sun, Xiaogang Wang, J

51 Dec 13, 2022
Official implementation of "Motif-based Graph Self-Supervised Learning forMolecular Property Prediction"

Motif-based Graph Self-Supervised Learning for Molecular Property Prediction Official Pytorch implementation of NeurIPS'21 paper "Motif-based Graph Se

zaixi 71 Dec 20, 2022
Rotation-Only Bundle Adjustment

ROBA: Rotation-Only Bundle Adjustment Paper, Video, Poster, Presentation, Supplementary Material In this repository, we provide the implementation of

Seong 51 Nov 29, 2022
Home for cuQuantum Python & NVIDIA cuQuantum SDK C++ samples

Welcome to the cuQuantum repository! This public repository contains two sets of files related to the NVIDIA cuQuantum SDK: samples: All C/C++ sample

NVIDIA Corporation 147 Dec 27, 2022
Deep learning models for classification of 15 common weeds in the southern U.S. cotton production systems.

CottonWeeds Deep learning models for classification of 15 common weeds in the southern U.S. cotton production systems. requirements pytorch torchsumma

Dong Chen 8 Jun 07, 2022
使用OpenCV部署全景驾驶感知网络YOLOP,可同时处理交通目标检测、可驾驶区域分割、车道线检测,三项视觉感知任务,包含C++和Python两种版本的程序实现。本套程序只依赖opencv库就可以运行, 从而彻底摆脱对任何深度学习框架的依赖。

YOLOP-opencv-dnn 使用OpenCV部署全景驾驶感知网络YOLOP,可同时处理交通目标检测、可驾驶区域分割、车道线检测,三项视觉感知任务,依然是包含C++和Python两种版本的程序实现 onnx文件从百度云盘下载,链接:https://pan.baidu.com/s/1A_9cldU

178 Jan 07, 2023
Official repository for Automated Learning Rate Scheduler for Large-Batch Training (8th ICML Workshop on AutoML)

Automated Learning Rate Scheduler for Large-Batch Training The official repository for Automated Learning Rate Scheduler for Large-Batch Training (8th

Kakao Brain 35 Jan 04, 2023
Latex code for making neural networks diagrams

PlotNeuralNet Latex code for drawing neural networks for reports and presentation. Have a look into examples to see how they are made. Additionally, l

Haris Iqbal 18.6k Jan 01, 2023