PyTorchViz
This is a fork of the original package torchviz, which is no longer maintained.
A small package to create visualizations of PyTorch execution graphs and traces.
Installation
Install graphviz, e.g.:
brew install graphviz
Install the package itself:
pip install torchviz2
Usage
Example usage of make_dot:
import torch
from torch import nn
from torchviz import make_dot
model = nn.Sequential()
model.add_module('W0', nn.Linear(8, 16))
model.add_module('tanh', nn.Tanh())
model.add_module('W1', nn.Linear(16, 1))
x = torch.randn(1, 8)
y = model(x)
make_dot(y.mean(), params=dict(model.named_parameters()))
Set show_attrs=True and show_saved=True to see what autograd saves for the backward pass. (Note that this is only available for pytorch >= 1.9.)
model = nn.Sequential()
model.add_module('W0', nn.Linear(8, 16))
model.add_module('tanh', nn.Tanh())
model.add_module('W1', nn.Linear(16, 1))
x = torch.randn(1, 8)
y = model(x)
make_dot(y.mean(), params=dict(model.named_parameters()), show_attrs=True, show_saved=True)
Metadata
Release files for torchviz2 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torchviz2-0.0.2.tar.gz | 5.7 kB | Without provenance | Details for torchviz2-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torchviz2-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for torchviz2-0.0.2-py3-none-any.whl |
Total release size: 11.2 kB
Release files / torchviz2-0.0.2.tar.gz
| Download URL | torchviz2-0.0.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7db33c6701354dc48944d51fd267fc72df9b141007bfcd7ca7963198ebc26fe5
|
|
BLAKE2b-256 checksum How to use checksums |
5b9fc0e0d7e790003c8bc7c7db5ccaf49710a1ccc46de066bbb6b630ef5b55c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / torchviz2-0.0.2-py3-none-any.whl
| Download URL | torchviz2-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b81fc6e925136cb97c21893355941c39aa6ce9f0d45e3aef8d54d0ac0eacaa47
|
|
BLAKE2b-256 checksum How to use checksums |
62897aa6ad8acb05a26b83ebfc510fb61eaeb1ca74480ea390d8cd26adba2a5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for torchviz2 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.