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
Hashes for DNN_printer-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c66fb6341cf8fd2ea8a707ed54ff06f377161ea40269317d4fde78bb310008c |
|
MD5 | 025368b0d9a4e40fad466e2d3496d4ea |
|
BLAKE2b-256 | 242b357ab5dbc5ec378f497d5ec16ba73f298e2fd78a443f4ac58af56483da81 |