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.

Installation

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

pip install tflite2onnx

Usage

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.

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 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 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page