Convert TensorFlow Lite models to ONNX models
Project description
Converting TensorFlow Lite models to ONNX
tflite2onnx
converts TensorFlow Lite (TFLite) models (*.tflite
) to ONNX models (*.onnx
).
This project is under early stage of development, contributions are welcome.
Usage
If you'd like to convert a TensorFlow model (
*.pb
orSavedModel
whatever) to ONNX, trytf2onnx
. Or, you can firstly convert it to TFLite (*.tflite
), and then convert the TFLite model to ONNX.
Install via pip pip install tflite2onnx
.
After installation, you may either try either.
Python interface
import tflite2onnx
tflite_path = '/path/to/original/tflite/model'
onnx_path = '/path/to/save/converted/onnx/model'
tflite2onnx.convert(tflite_path, onnx_path)
tflite2onnx
now supports explicit layout, check the
test example.
Command line
tflite2onnx /path/to/original/tflite/model /path/to/save/converted/onnx/model
Contributing
Any contribution is welcome to this tool.
- If you think something is wrong, report bugs.
- If some operators are not supported yet, you may request new operator.
- It would be great if you can help to enable new operators, please join us with How to enable new operator.
- Feel free to open discussions if you have any great idea to improve this tool.
Resources
License
Apache License Version 2.0.
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
Built Distribution
Hashes for tflite2onnx-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b725222dc905e808e4205a04d8e2a4ab8c382928bf5d6bfedbde6a54347cefe |
|
MD5 | e3c7125e235a23758a2067af17bbb4bf |
|
BLAKE2b-256 | 83a116e087fb4e80787dd4109200f16db354a09595f3754b246c0f99d7b18fe8 |