Back to directory

ONNX to Keras and ONNX to TFLite tools

onnx2tflite converts an ONNX model to Keras or TensorFlow Lite, automatically aligning PyTorch's channel order to TensorFlow's, and supports FP16 and INT8 quantization for deployment.

ONNX to Keras and ONNX to TFLite tools

onnx2tflite converts a model exported from ONNX into a Keras model or a TensorFlow Lite file, automatically converting PyTorch's NCHW channel layout to TensorFlow's NHWC layout. The project reports output within about 1e-5 average error per element compared to the original ONNX model, and TensorFlow Lite output around 30 percent faster than the existing onnx_tf converter.

It supports FP16 and INT8 quantization, including full-integer quantization, with INT8 calibration data supplied as one NumPy file per model input; it offers two conversion backends, a stable Keras-based path and a faster direct-IR path that builds a TensorFlow Lite FlatBuffer straight from the ONNX graph and bypasses Keras, falling back to the Keras path for operators the direct path does not yet support, such as Erf.

It is installed from source with setup.py and used from Python or a command-line interface.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.