Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,13 @@ python: 3.6
cache: pip

# Required
# - ONNX 1.6 (Opset 11), TensorFlow 1.15.0, Sep 2019
# - ONNX 1.6 (Opset 11), TensorFlow 1.15.3, May 2020
# Optional
# - ONNX 1.7 (Opset 12), TensorFlow 1.15.3, May 2020
# - ONNX 1.7 (Opset 12), TensorFlow 1.15.4, Sept 2020

env:
- ONNX_PIP=onnx==1.6.0 TF_PIP=tensorflow==1.15.0
- ONNX_PIP=onnx==1.6.0 TF_PIP=tensorflow==1.15.3
- ONNX_PIP=onnx==1.7.0 TF_PIP=tensorflow==1.15.3
- ONNX_PIP=onnx==1.7.0 TF_PIP=tensorflow==1.15.4

jobs:
fast_finish: true
# Be aware when updating the dependency versions.
# Envs below must match *exactly* an env from above,
# otherwise an env failure will fail the overall build.
allow_failures:
- env: ONNX_PIP=onnx==1.7.0 TF_PIP=tensorflow==1.15.3

before_install: pip install -U setuptools
install: pip install $ONNX_PIP $TF_PIP
Expand Down
2 changes: 1 addition & 1 deletion ONNX_VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.7.0
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Tensorflow Backend for ONNX
[![Build Status](https://travis-ci.org/onnx/onnx-tensorflow.svg?branch=tf-1.x)](https://travis-ci.org/onnx/onnx-tensorflow)

## To convert models from ONNX to Tensorflow:

### Use CLI:

[Command Line Interface Documentation](https://github.com/onnx/onnx-tensorflow/blob/master/doc/CLI.md)
[Command Line Interface Documentation](https://github.com/onnx/onnx-tensorflow/blob/tf-1.x/doc/CLI.md)

From ONNX to Tensorflow: `onnx-tf convert -i /path/to/input.onnx -o /path/to/output.pb`

### Convert programmatically:

[From ONNX to Tensorflow](https://github.com/onnx/onnx-tensorflow/blob/master/example/onnx_to_tf.py)
[From ONNX to Tensorflow](https://github.com/onnx/onnx-tensorflow/blob/tf-1.x/example/onnx_to_tf.py)

### Migrating from `onnx-tf` to `tf-onnx`:
We have joined force with Microsoft to co-develop ONNX Tensorflow frontend.
Expand All @@ -34,11 +33,11 @@ ONNX-TF requires ONNX (Open Neural Network Exchange) as an external dependency,

The specific ONNX release version that we support in the master branch of ONNX-TF can be found [here](https://github.com/onnx/onnx-tensorflow/blob/master/ONNX_VERSION_NUMBER). This information about ONNX version requirement is automatically encoded in `setup.py`, therefore users needn't worry about ONNX version requirement when installing ONNX-TF.

Because users often have their own preferences for which variant of Tensorflow to install (i.e., a GPU version instead of a CPU version), we do not explicitly require tensorflow in the installation script. It is therefore users' responsibility to ensure that the proper variant of Tensorflow is available to ONNX-TF. Moreover, we require Tensorflow version == 1.15.0.
Because users often have their own preferences for which variant of Tensorflow to install (i.e., a GPU version instead of a CPU version), we do not explicitly require tensorflow in the installation script. It is therefore users' responsibility to ensure that the proper variant of Tensorflow is available to ONNX-TF. Moreover, we require Tensorflow version == 1.15.4.

To install the latest version of ONNX-TF v1.6.0
To install the latest version of ONNX-TF v1.7.0
- Run `git clone https://github.com/onnx/onnx-tensorflow.git && cd onnx-tensorflow`.
- Run `git checkout v1.6.0-tf-1.15`.
- Run `git checkout v1.7.0-tf-1.15`.
- Run `pip install -e .`.

## Development:
Expand All @@ -51,7 +50,7 @@ To install the latest version of ONNX-TF v1.6.0

### Installation:
- Install ONNX master branch from source.
- Install Tensorflow 1.15.0. (For Tensorflow 2.x support please refer [here](https://github.com/onnx/onnx-tensorflow/blob/master/README.md/).)
- Install Tensorflow 1.15.4. (For Tensorflow 2.x support please refer [here](https://github.com/onnx/onnx-tensorflow/blob/master/README.md/).)
- Run `git clone https://github.com/onnx/onnx-tensorflow.git && cd onnx-tensorflow`.
- Run `git checkout tf-1.x`.
- Run `pip install -e .`.
Expand Down Expand Up @@ -83,17 +82,6 @@ http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
To perfom unit tests, run `python -m unittest discover test`.
Testing requires significant hardware resources, but nonetheless, we highly recommend that users run through the complete test suite before deploying onnx-tf. The complete test suite typically takes between 15 and 45 minutes to complete, depending on hardware configurations.

PS. Please ensure your code is backward compatible with older version of ONNX. You can easily test it by running the following [docker container](https://hub.docker.com/r/winnietsang/onnx-tensorflow) with your code. If you don't have Docker installed yet, please follow this link to install [Docker](https://docs.docker.com/install/) on your environment.
```
sudo docker pull winnietsang/onnx-tensorflow:onnx1.7.0-tf1.15
sudo docker run -it --name=YOUR-CONTAINER-NAME winnietsang/onnx-tensorflow:onnx1.7.0-tf1.15 /bin/bash
git clone https://github.com/YOUR-USERNAME/onnx-tensorflow.git
cd onnx-tensorflow
git checkout -b YOUR-BRANCH --track remotes/origin/YOUR-BRANCH
pip3 install -e .
python3 -m unittest discover test
```

#### Test Help:
https://docs.python.org/2/library/unittest.html

Expand Down
2 changes: 1 addition & 1 deletion VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.7.0
1 change: 1 addition & 0 deletions Versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ONNX-TensorFlow version|ONNX version|TensorFlow version
1.3.0|1.3.0 (opset 8)|1.13.1
1.5.0|1.5.0 (opset 10)|1.15.0
1.6.0|1.6.0 (opset 11)|1.15.0
1.7.0|1.7.0 (opset 12)|1.15.4
6 changes: 3 additions & 3 deletions doc/support_status.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ONNX-Tensorflow Support Status
|||
|-:|:-|
|ONNX-Tensorflow Version|Master ( commit id: 13c461496b84724c29a39d326ae4f4b12ff1e9b5 )|
|ONNX-Tensorflow Version|Master ( commit id: c724a1e2dfafce0c767d9b0af4151c7f52dfcf2a )|
|ONNX Version|v1.7.0|
|Tensorflow Version|v1.15.0|
|Tensorflow Version|v1.15.4|

Notes:
* Values that are new or updated from a previous opset version are in bold.
Expand Down Expand Up @@ -179,7 +179,7 @@ Notes:
|Where|-|-|-|-|-|-|-|-|**9**|9|9|9|Where|
|Xor|**1**|1|1|1|1|1|**7**|7|7|7|7|7|Xor|

ONNX-TF Supported Operators / ONNX Operators: 155 / 162
ONNX-TF Supported Operators / ONNX Operators: 156 / 162

Notes:
1. Cast: Cast string to float32/float64/int32/int64 are not supported in Tensorflow.
Expand Down
Loading