tf2onnx converts TensorFlow (tf-1.x or tf-2.x), keras, tensorflow.js and tflite models to ONNX via command line or python API. Note: tensorflow.js support was just added. While we tested it with many tfjs models from tfhub, it should be considered experimental. TensorFlow has many more ops than ONNX and occasionally mapping a model to ONNX creates issues. tf2onnx will use the ONNX version installed on your system and installs the latest ONNX version if none is found. We support and test ONNX opset-13 to opset-17. opset-6 to opset-12 should work but we don't test them. If you want the graph to be generated with a specific opset, use --opset in the command line, for example --opset 13. When running under tf-2.x tf2onnx will use the tensorflow V2 controlflow.

Features

  • You can install tf2onnx on top of tf-1.x or tf-2.x
  • If you don't have TensorFlow installed already, install the desired TensorFlow build
  • ONNX Runtime (available for Linux, Windows, and Mac)
  • tensorflow-onnx requires onnx-1.9 or better
  • ONNX requires default values for graph inputs to be constant
  • By default we use the opset 13 to generate the graph

Project Samples

Project Activity

See All Activity >

Categories

Machine Learning

License

Apache License V2.0

Follow tf2onnx

tf2onnx Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of tf2onnx!

Additional Project Details

Programming Language

Python

Related Categories

Python Machine Learning Software

Registered

2022-08-12