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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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