torchinfo
Model summary in PyTorch, based off of the original torchsummary.
Decision gist · record as of 2026-08-14
Yes. Torchinfo is a lightweight, actively maintained debugging tool with no dependencies, permissive licensing, and broad PyTorch version support. Install it if you develop or analyze PyTorch models and want structured visibility into layer structure and computational cost.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires PyTorch 1.4.0 or later; model must be instantiated before calling summary().
- Low friction: pure Python wheel with no runtime dependencies.
- Active maintenance with recent commits and 2946 GitHub stars.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute torchinfo freely in commercial and private projects with minimal restrictions.
last release 2023-05-14 (1188 days) · last repo commit 2026-08-10 · 2,946 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 653,131 downloads/mo, #5,538 on PyPI
Alternatives
Verify before relying
pip install torchinfo
from torchinfo import summary
model = ConvNet()
summary(model, input_size=(16, 1, 28, 28))- Whether the package works correctly with PyTorch versions newer than the latest release date (2023-05-14)
- Performance characteristics when summarizing very large or deeply nested models
What it is and what it does
Torchinfo is a PyTorch utility that generates human-readable summaries of neural network models. It displays layer-by-layer information including input and output shapes, parameter counts, and multiply-accumulate operations (Mult-Adds), helping developers understand and debug their model architectures. Unlike the basic print(model) output, torchinfo provides a structured, Keras-like summary view.
The package accepts either input tensor shapes or actual input data, performs a forward pass through the model to gather statistics, and returns a ModelStatistics object with configurable output columns. It supports RNNs, LSTMs, branching architectures, and nested layers, with options for verbose mode, custom display widths, and Jupyter Notebook integration.
Use it for
- Debug neural network architecture by viewing layer-by-layer shapes and parameter counts during model development
- Estimate model memory footprint and computational cost before training on expensive hardware
- Document model structure for papers or reports by capturing formatted summary output
- Verify that model layers are connected correctly and data flows as expected through the network
- Compare parameter efficiency across different model designs or architectures
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Torchinfo is a lightweight, actively maintained debugging tool with no dependencies, permissive licensing, and broad PyTorch version support. Install it if you develop or analyze PyTorch models and want structured visibility into layer structure and computational cost.
Install
torchinfo on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Active maintenance with recent commits and 2946 GitHub stars. Last release was over a year ago, but the repository remains actively maintained.
Requires PyTorch 1.4.0 or later; model must be instantiated before calling summary().
License in practice
MIT license is permissive; you can use, modify, and distribute torchinfo freely in commercial and private projects with minimal restrictions.
Quickstart
pip install torchinfo
from torchinfo import summary
model = ConvNet()
summary(model, input_size=(16, 1, 28, 28))
Verify before relying
- Whether the package works correctly with PyTorch versions newer than the latest release date (2023-05-14)
- Performance characteristics when summarizing very large or deeply nested models
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 1,188 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 653,131 / month, #5,538 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: torchinfo-1.8.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytorch model summary”
- torchinfoGenerates detailed summaries of PyTorch neural network models,…
- torchsummaryDisplays a Keras-style summary of PyTorch neural network models,…
- lovely-tensorsMonkey-patches PyTorch tensors to display human-readable summaries…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also torchsummary · torch-geometric · torcheval · ai-edge-model-explorer · rotary-embedding-torch · pytorch-lightning · edge-mdt-cl · lovely-tensors · torch