A neural network visualization engine, built for pytorch
Project description
Neural Network Visualization Tool
This tool is designed to provide a dynamic visualization of neural network training. It integrates with a PyTorch model's forward pass as a decorator, allowing you to visualize how neural network training occurs.
Features:
-
Supported Loss Functions:
NLLLoss
CrossEntropyLoss
-
Layer Compatibility:
- Currently supports fully connected (dense) layers.
Interactive Visualization:
- View the gradient, bias, and weight histories for both nodes and lines.
- Click on any node or line to inspect its parameters.
Installation
pip install pytorch_visualizer
How the API is used
Below is an example showing how the API can be used:
from python_visualizer.nn_visualizer import visualize
class SimpleNN(nn.Module):
def __init__(self):
super(SimpleNN, self).__init__()
self.fc1 = nn.Linear(2, 5)
self.fc2 = nn.Linear(5, 3)
self.relu = nn.ReLU()
@visualize(epochs=5, labels=None, loss_func=None, backward=False)
def forward(self, x):
x = self.fc1(x)
x = self.relu(x)
x = self.fc2(x)
return x
check demo.ipynb for a full implementation with a training loop
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytorch_visualizer-0.1.2.tar.gz
(581.0 kB
view details)
Built Distribution
File details
Details for the file pytorch_visualizer-0.1.2.tar.gz
.
File metadata
- Download URL: pytorch_visualizer-0.1.2.tar.gz
- Upload date:
- Size: 581.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36ba359f54fc5fa58ad1a4ee7d750a2dde4a83fb3f46cacfa7ff50df68f4971c |
|
MD5 | 8a2113fed4da4ca1bc5b97ba993c6c96 |
|
BLAKE2b-256 | 8d5ef9a5ee19639acbb2638b8989b3d8016e311c4bc1c0e3efbc082687f45d73 |
File details
Details for the file pytorch_visualizer-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pytorch_visualizer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 587.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6b13456e57c1d02c2d93e26d6ca0ecde99740cd80c715f11a38a3b8ed0c780c |
|
MD5 | 88d7c3ddaa632b87820406cb173e5ddb |
|
BLAKE2b-256 | e8e9ef9d169433b0724aa01089ea925bcab43b96dc0155bb1740fb5a7393e153 |