Skip to main content

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:

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

![Sample](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.

:Authors

CPing & Peiyi Hong

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.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DNN_printer-0.0.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

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

Hashes for DNN_printer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a0312baa120e6592c16e81521c9131289005ecbc4ff63ed7d43fa713c9c38596
MD5 19bd3f0f29943a5c43dbe26af5ec7e84
BLAKE2b-256 a3e7249a031fb9441df430b3d726335db3253eb7c40e314601b5563fbf1c86d1

See more details on using hashes here.

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

Hashes for DNN_printer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0c66fb6341cf8fd2ea8a707ed54ff06f377161ea40269317d4fde78bb310008c
MD5 025368b0d9a4e40fad466e2d3496d4ea
BLAKE2b-256 242b357ab5dbc5ec378f497d5ec16ba73f298e2fd78a443f4ac58af56483da81

See more details on using hashes here.

Supported by

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