--- id: tf2onnx version: "1.17.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # tf2onnx — Tensorflow to ONNX converter License: permissive · Maintenance: active · Downloads: 395.3K/mo ## What it is and what it does tf2onnx is a model converter that takes trained TensorFlow models in various formats (saved_model, checkpoint, graphdef, tflite, tensorflow.js) and translates them into ONNX format. This enables models trained in TensorFlow to run on any ONNX-compatible runtime, improving portability and deployment flexibility. The package works via a command-line interface or Python API, with support for opset versions 14-18 (default 15). It requires TensorFlow 2.13 or later and Python 3.10-3.12. The converter handles the fundamental challenge that TensorFlow has more operations than ONNX, so not all models convert cleanly. The project documents supported operations and provides troubleshooting guidance. TensorFlow.js support is experimental. The package is actively maintained but currently seeking a new maintainer, which is worth noting when evaluating long-term reliability. Use it for: - Deploy TensorFlow models on inference engines that don't natively support TensorFlow format - Convert Keras models to ONNX for cross-platform inference on mobile, edge, or cloud deployments - Migrate TFLite models to ONNX when targeting different hardware accelerators or inference frameworks - Enable model interoperability in ML pipelines that mix models from different training frameworks - Export trained models for production serving on systems where TensorFlow runtime is unavailable ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts TensorFlow, Keras, TensorFlow.js, and TFLite models to ONNX format via command line or Python API, enabling model portability across different inference runtimes. Yes, if you need to convert TensorFlow models to ONNX. The package is production-stable, actively maintained, has no known security issues, and installs with low friction. The main caveat is that not all TensorFlow operations map cleanly to ONNX, so conversion success depends on your specific model architecture. The active search for a new maintainer is a yellow flag for long-term support, but current maintenance is solid. ## Install pip install tf2onnx uv add tf2onnx poetry add tf2onnx ## Installing tf2onnx Before you install: Low friction install with stable maintenance. The package is actively maintained, has no known vulnerabilities, and depends on standard libraries (numpy, onnx, protobuf, flatbuffers, requests). However, the project is actively seeking a new maintainer, which may signal future maintenance uncertainty. License in practice: Apache-2.0 is a permissive license allowing commercial use, modification, and distribution with minimal restrictions, making this package suitable for most production and research contexts. Quickstart: pip install tf2onnx python -m tf2onnx.convert --saved-model tensorflow-model-path --output model.onnx Requires TensorFlow 2.13 or later and Python 3.10-3.12; TensorFlow must be installed separately before conversion. Verify before relying: - Extent of tensorflow.js model support coverage beyond the noted experimental status and tested tfhub models - Performance characteristics and conversion success rates for complex or custom TensorFlow operations - Compatibility guarantees with TensorFlow versions outside the tested 2.13-2.15 range ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 395.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tensorflow to onnx converter, convert keras models to onnx, tflite model conversion, tensorflow model export, onnx model conversion tool, model-conversion, onnx, tensorflow [View on SkillFed](https://skillfed.io/packages/tf2onnx) · [View on PyPI](https://pypi.org/project/tf2onnx/)