A tool for ONNX model:Shape inference, MACs(FLOPs) counting for each layer, Add any layer's output tensors to model's outputs, Export any weights tensors to numpy file. fp16 conversion included.
Project description
onnx-tool
A tool for ONNX model:
- Shape inference.
- MACs(FLOPs) counting for each layer.
- Add any layer's output tensors to model's outputs.
- Export any weights tensors to numpy file. fp16 conversion included.
Shape inference
how to use: data/Profile.md.
MACs counting for each layer (FLOPs=2*MACs)
how to use: data/Profile.md.
Add any hidden tensors to model's outputs
how to use: data/Profile.md.
Export weight tensors to files
how to use: data/ExportTensors.md.
How to install
pip install onnx-tool
OR
pip install --upgrade git+https://github.com/ThanatosShinji/onnx-tool.git
Known Issues
- Loop op is not supported
Results of ONNX Model Zoo and SOTA models
Some models have dynamic input shapes. The MACs varies from input shapes. The input shapes used in these results are writen to data/public/config.py. These onnx models with all tensors' shape can be downloaded: baidu drive(code: p91k) google drive
|
|
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 onnx_tool-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95e153006b537f927f64adde8b14b9546ea04879b03fff8e39b0f48a9fba1298 |
|
MD5 | 202d1e4d5db8f42c4caf634a98fcae72 |
|
BLAKE2b-256 | c7928b5d69f459c637dca5f14f653ffb7d59b9e09882cef9b98885cb9670cbcc |