Print feature map and weight size of PyTorch models.
Project description
:DNN Printer
This is a simple package to print the size of feature map and DNN weight.
:Usage
You can use this tool by three steps:
Install printer by running pip3 install printer -U –user
Find the file which defines the structure of a Network. Add the following code:
from DNN_printer import DNN_printer
- def train(epoch):
print(’nEpoch: %d’ % epoch) net.train() train_loss = 0 correct = 0 total = 0 DNN_printer(net, (3, 32, 32),batch_size) … …
Notice: The first parameter is the net, the second paramater is the size of input data and the third parameter is the batch size.
:result
:Requirements
Make sure torch has been installed.
:Authors
CPing & Peiyi Hong
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 DNN_printer-0.0.2.tar.gz.
File metadata
- Download URL: DNN_printer-0.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0312baa120e6592c16e81521c9131289005ecbc4ff63ed7d43fa713c9c38596
|
|
| MD5 |
19bd3f0f29943a5c43dbe26af5ec7e84
|
|
| BLAKE2b-256 |
a3e7249a031fb9441df430b3d726335db3253eb7c40e314601b5563fbf1c86d1
|
File details
Details for the file DNN_printer-0.0.2-py3-none-any.whl.
File metadata
- Download URL: DNN_printer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c66fb6341cf8fd2ea8a707ed54ff06f377161ea40269317d4fde78bb310008c
|
|
| MD5 |
025368b0d9a4e40fad466e2d3496d4ea
|
|
| BLAKE2b-256 |
242b357ab5dbc5ec378f497d5ec16ba73f298e2fd78a443f4ac58af56483da81
|