#429429th of 433 in ML frameworks and libraries

torchview

Graphviz visualizations of PyTorch model graphs with tensor shapes

Stars
1.1k
License
MIT
Last commit
Feb 2026
Last release
Feb 2023
Language
Python
Stars, last 29 weeks+50
8 May 2026: 1,044 stars15 May 2026: 1,046 stars22 May 2026: 1,046 stars29 May 2026: 1,050 stars5 Jun 2026: 1,051 stars12 Jun 2026: 1,054 stars19 Jun 2026: 1,054 stars26 Jun 2026: 1,055 stars3 Jul 2026: 1,056 stars10 Jul 2026: 1,061 stars17 Jul 2026: 1,062 stars24 Jul 2026: 1,063 stars31 Jul 2026: 1,064 stars7 Aug 2026: 1,066 stars14 Aug 2026: 1,068 stars21 Aug 2026: 1,070 stars28 Aug 2026: 1,071 stars4 Sept 2026: 1,074 stars11 Sept 2026: 1,076 stars18 Sept 2026: 1,076 stars25 Sept 2026: 1,078 stars2 Oct 2026: 1,079 stars9 Oct 2026: 1,081 stars16 Oct 2026: 1,082 stars23 Oct 2026: 1,084 stars30 Oct 2026: 1,087 stars6 Nov 2026: 1,088 stars13 Nov 2026: 1,090 stars20 Nov 2026: 1,091 stars27 Nov 2026: 1,094 stars

1,044 on 8 May 20261,094 on 27 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Torchview is a Python library that draws PyTorch models as Graphviz graphs, showing modules, torch functions, tensors and input/output shapes. It records the graph during a forward pass using __torch_function__ and a Tensor subclass, and can run on meta tensors so large models use no memory. It is described as a PyTorch counterpart to Keras plot_model.

Who it is for: PyTorch developers who want architecture diagrams of their models

Strengths

  • Meta-device mode builds graphs without allocating memory for large models (PyTorch 1.13+)
  • Shows operations between tensors, not just module calls
  • Rolls recursive modules such as RNNs into a compact view
  • Handles nested inputs (dict, list) and Hugging Face tokenizer outputs

Weaknesses

  • Requires the Graphviz system binary (dot) in addition to the Python package
  • Last release was 2023-02-14, though commits continue
  • No module parameter info and no graph neural network support yet (listed in TODO)
  • SVG output can be cropped in VS Code notebooks without a PNG workaround

What it needs

  • no GPU
  • Needs graphviz (dot), PyTorch
  • Models: PyTorch nn.Module, Hugging Face models

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in ML frameworks and libraries

See all 433
Also in ML frameworks and libraries
RankProjectScore
#427sumo-rlGymnasium and PettingZoo environments for RL traffic signal control in SUMO1.1k starsMIT9 out of 100
#428xaiPython library for data imbalance and model bias analysis in tabular ML1.3k starsMIT8 out of 100
#430sklearn-crfsuitescikit-learn-style Python wrapper for CRFsuite sequence labeling441 starsno license7 out of 100
#431drl-robot-navigationTD3 reinforcement learning for robot goal navigation in ROS Gazebo1.4k starsMIT6 out of 100
#432adbenchBenchmark suite for tabular anomaly detection algorithms and datasets1k starsBSD-2-Clause5 out of 100