Draw basic feed-forward neural network architecture diagrams with matplotlib
Project description
- Installation The most common way to install is via pip:
pip install neural-network-draw
- Basic Usage To use the library, they simply need to import the DrawNN class and provide a list representing the number of neurons in each layer.
from neural_network_draw import DrawNN
# Example: 4 input neurons, two hidden layers (8 and 8), and 2 output neurons
my_network = [4, 8, 8, 2]
# Initialize the drawer and render the diagram
viewer = DrawNN(my_network)
viewer.draw()
- More Examples
from neural_network_draw import DrawNN
# Small network
DrawNN([2, 3, 1]).draw()
# Balanced network
DrawNN([4, 4, 4]).draw()
# Deeper network with multiple hidden layers
DrawNN([6, 8, 8, 4, 2]).draw()
from neural_network_draw import NeuralNetwork
# Lower-level API if you want to build the layers manually
network = NeuralNetwork(8)
network.add_layer(3)
network.add_layer(8)
network.add_layer(2)
network.draw()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neural_network_draw-0.1.0.tar.gz.
File metadata
- Download URL: neural_network_draw-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0ea2eddd0ef051276a5b6d55ef14772a8c0c761d9a84ac224ea7a53620fb33b
|
|
| MD5 |
06b33b3fb883e62116b8bae26f730284
|
|
| BLAKE2b-256 |
580a86e1cd18d5dc03e3146c4158a68221dcb5f16b9fa9127687e53b81e85736
|
File details
Details for the file neural_network_draw-0.1.0-py3-none-any.whl.
File metadata
- Download URL: neural_network_draw-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b84fa4ce38e576e334960393bbab155bfcb57ee1a0edb843142c90576d718d58
|
|
| MD5 |
269d0dd81d13a61af3049757da5a269a
|
|
| BLAKE2b-256 |
5f2f85701c5b804886725759b58b78526eadce3cae7922dbd3205188f53dd9ec
|