Userful tools for ONNX models
Install using pip
From source:
pip3 install git+https://github.com/ninja-96/ort-tools
- Quantize ONNX mode
python3 -m ort_tools.quant -m <path to onnx model>
- Speedtest ONNX model
python3 -m ort_tools.speedtest -m <path to onnx model>
- Quantization module quantize model using random input data.
- You must set
--shapes
argument to run tools:
python3 -m ort_tools.speedtest -m ./model.onnx --shape images:1x3x224x224:fp32
If ONNX model has 2 or more inputs, just enumerate input names separated by commas:
python3 -m ort_tools.speedtest -m ./model.onnx --shape images:1x3x224x224:fp32,gray_images:1x3x224x224:fp32
- onnx - Open standard for machine learning interoperability
- onnxruntime - ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
All versions available, see the tags on this repository.
- Oleg Kachalov - Initial work - ninja-96
See also the list of contributors who participated in this project.
This project is licensed under the GPL-3.0 license - see the LICENSE.md file for details.