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.2.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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mxop-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 22910304e19c99d8940ba5144cc23c5204af3180822bf514dbfc20f24e756b18
MD5 c8a1578396d4ac1f21d678a4718829a6
BLAKE2b-256 fb264cfe02834b701158c22290558d135489b9436e9eee2f7bfddb506ae315cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mxop-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 266b9600f3ac06930bb17d8462e151e853b4389ebfeac736adcf84cd9b055471
MD5 480f1c16329ee784e183a9337ce09941
BLAKE2b-256 542b2123dabdebc28cefddb3667f409a1978b91ee5b959bc1175601a77416a36

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.2 This release

2 files

0.1.1

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