Skip to main content

MXOP: MXNet-OpSummary

It only works for gluon yet.

Reference: THOP: PyTorch-OpCounter

Installation

  • PyPi
    pip install --index-url https://pypi.org/simple/ mxop
    
  • Github (latest)
    pip install --upgrade git+https://github.com/hey-yahei/OpSummary.MXNet.git
    

Usage

Gluon

  • Count OPs
    from mxop.gluon import count_ops
    op_counter = count_ops(net)   # net is the gluon model you want to count OPs 
    
  • Count parameters
    from mxop.gluon import count_params
    op_counter = count_params(net, input_size)   # net is the gluon model you want to count OPs
                                                 # input_size is the shape of your input 
    
  • Print summary
    from mxop.gluon import op_summary
    op_counter = op_summary(net, input_size)   # net is the gluon model you want to count OPs 
                                               # input_size is the shape of your input 
    

TODO

  • Count OPs and parameters for each layer.
  • Support Symbol model for MXNet.

Download files

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

Source Distribution

mxop-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

mxop-0.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file mxop-0.1.1.tar.gz.

File metadata

  • Download URL: mxop-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for mxop-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f84086c8e271d4952735560f0d498ce8c98caa74b7cc3c3a35e0a8f5d24f3f08
MD5 403c67f983ece876a1c142709ffd6c3d
BLAKE2b-256 1bc3d8ce4d58cc970ecce45755a6de593e963115909433872fec77a01a6aeb72

See more details on using hashes here.

File details

Details for the file mxop-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mxop-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for mxop-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da62995e2425d15ef93e8180de79e7a0cbb09b866bde1f2adfd26db1b36d14fd
MD5 80c0385d0d3124c28a02cf1471447a45
BLAKE2b-256 d251066073ac58b1a9023066e99b86f7abea3c451c6eb85a865ab0a78903806a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page