Practical overview
When it fits
Use it when you have a PyTorch model and its input dimensions and want a layer-by-layer report beyond the standard printed model representation.
Who it is for
PyTorch developers inspecting model structure during development or debugging.
Documented uses
- Review layer output shapes and parameter counts in a compact report.
- Add model-structure information to a debugging workflow.
Requirements & limits
The repository is public and identifies the project as open source under the MIT license. The README documents installation with pip or use by cloning the repository.
- The summary call requires the model's input dimensions and performs a forward pass.
- The README recommends considering the newer, updated torchinfo project.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Generate a summary for a PyTorch model
Print a Keras-style structure report for a model using its input dimensions.
Before you start
- A PyTorch model object.
- The model's input dimensions.
- Install the package with
pip install torchsummaryor clone the project repository.
Steps
Install
torchsummaryor clone the repository.Import
summarywithfrom torchsummary import summary.Call
summary(your_model, input_size=(channels, H, W))with the model and its input dimensions.
Expected outcome
A printed model summary with layer output shapes and parameter counts; the examples also report estimated memory sizes.
Guide limitations
- An input size is required because the utility makes a forward pass through the network.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- sksq96/pytorch-summary · Official homepage title · retained in its source language

