Skip to main content

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:

  1. Install printer by running pip3 install printer -U –user

  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DNN_printer-0.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

DNN_printer-0.0.1-py3-none-any.whl (11.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page