Skip to main content

Converting TensorFlow Lite models to ONNX models

Project description

Convert TensorFlow Lite models to ONNX

Build and Test Sanity

This tflite2onnx package converts TensorFlow Lite (TFLite) models (*.tflite) to ONNX models (*.onnx).

This project is under early stage of development, contributions are welcome at GitHub.


Simply install via pip. This package requires tflite, onnx and numpy which should be installed automatically.

pip install tflite2onnx


It's simple as below. Command line tool will be provided soon.

import tflite2onnx

tflite_path = '/path/to/original/tflite/model'
onnx_path = '/path/to/save/converted/onnx/model'

tflite2onnx.convert(tflite_path, onnx_path)

If you'd like to convert a TensorFlow model (*.pb) to ONNX, you may try tf2onnx. Or, you can firstly convert TensorFlow model (*.pb) to TensorFlow Lite models (*.tflite), and then convert to ONNX using this tool.



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 Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

tflite2onnx-0.1.0-py3-none-any.whl (19.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page