Print feature map and weight size of PyTorch models.
Project description
# Split_layer 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 printer import printer
- def train(epoch):
print(’nEpoch: %d’ % epoch) net.train() train_loss = 0 correct = 0 total = 0 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
![image.png](https://upload-images.jianshu.io/upload_images/7862980-b7d5eda25c7ef725.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
## Requirements Make sure torch has been installed.
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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e53ca48b036254626306d9fe517b5a18abf3667c73593d460c4f62389d32f883 |
|
MD5 | b192f0750444cf8d5144d1fd30418628 |
|
BLAKE2b-256 | 52eb70e457f21328b34cb406c8408fac5092837b4e9a2a9312c9ef03f1e324c9 |