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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr

| Build Type | OS | Python | Tensorflow | ONNX opset | Status |
| --- | --- | --- | --- | --- | --- |
| Unit Test - Basic | Linux, MacOS<sup>\*</sup>, Windows<sup>\*</sup> | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 8-14 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=master) |
| Unit Test - Full | Linux, MacOS, Windows | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 8-14 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=master) | |
| Unit Test - Basic | Linux, MacOS<sup>\*</sup>, Windows<sup>\*</sup> | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 9-15 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=master) |
| Unit Test - Full | Linux, MacOS, Windows | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 9-15 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=master) | |
<br/>

## Supported Versions
Expand All @@ -27,7 +27,7 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr

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-8 to opset-14. opset-6 and opset-7 should work but we don't test them.
We support and test ONNX opset-9 to opset-15. opset-6 to opset-8 should work but we don't test them.
By default we use ```opset-9``` for the resulting ONNX graph since most runtimes will support opset-9.

If you want the graph to be generated with a specific opset, use ```--opset``` in the command line, for example ```--opset 13```.
Expand Down
76 changes: 35 additions & 41 deletions ci_build/azure_pipelines/keras2onnx_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,63 @@ jobs:
############ TF Keras Unit Tests ############
Python36-tf1.15:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python37-tf2.1:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.1.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python38-tf2.2:
python.version: '3.8'
ONNX_PATH: onnx==1.7.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.2.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python38-tf2.3:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python38-tf2.5:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

############ Pure Keras Unit Tests ############
Keras-Py36-tf1.15.0:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.2.5
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Keras-Py37-tf1.15.0:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.4.3
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

# UT for keras 2.3 need tensorflow <= 2.0.0
Keras-Py37-tf2.0.0:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.3.1
TENSORFLOW_PATH: tensorflow==2.0.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Keras-Py38-tf2.2.0:
python.version: '3.8'
ONNX_PATH: onnx==1.7.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.4.3
TENSORFLOW_PATH: tensorflow==2.2.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

steps:
- template: 'templates/keras2onnx_unit_test.yml'
Expand All @@ -80,63 +80,57 @@ jobs:
strategy:
matrix:
############ TF Keras Unit Tests ############
Python36-onnx1.2:
Python36-tf-1.15:
python.version: '3.6'
ONNX_PATH: onnx==1.2.3
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0

Python36-onnx1.5:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python37-tf2.1:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.1.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python37-tf2.2:
python.version: '3.7'
ONNX_PATH: onnx==1.7.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.2.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python37-tf2.3:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python37-tf2.5:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

############ Pure Keras Unit Tests ############
Keras-Py36-tf1.15.0:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.2.5
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Keras-Py37-tf2.0.0:
python.version: '3.7'
ONNX_PATH: onnx==1.7.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.3.1
TENSORFLOW_PATH: tensorflow==2.0.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Keras-Py37-tf2.2.0:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.4.3
TENSORFLOW_PATH: tensorflow==2.2.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

steps:
- template: 'templates/keras2onnx_unit_test.yml'
Expand Down
4 changes: 2 additions & 2 deletions ci_build/azure_pipelines/templates/job_generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ parameters:
python_versions: ['3.7']
tf_versions: ['']
onnx_versions: ['']
onnx_opsets: ['14', '13', '12', '11', '10', '9', '8']
onnx_backends: {onnxruntime: ['1.8.0']}
onnx_opsets: ['15', '14', '13', '12', '11', '10', '9']
onnx_backends: {onnxruntime: ['1.9.0']}
job: {}
run_setup: 'True'
report_coverage: 'False'
Expand Down
30 changes: 15 additions & 15 deletions ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ jobs:
############ TF Keras Unit Tests ############
Python36-tf1.15:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python38-tf2.5:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

############ Pure Keras Unit Tests ############
Keras-Py37-tf1.15.0:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.4.3
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

# UT for keras 2.3 need tensorflow <= 2.0.0
Keras-Py37-tf2.0.0:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.3.1
TENSORFLOW_PATH: tensorflow==2.0.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

steps:
- template: 'templates/keras2onnx_unit_test.yml'
Expand All @@ -48,25 +48,25 @@ jobs:
strategy:
matrix:
############ TF Keras Unit Tests ############
Python36-onnx1.2:
Python36-tf-1.15:
python.version: '3.6'
ONNX_PATH: onnx==1.2.3
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

Python37-tf2.3:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

############ Pure Keras Unit Tests ############
Keras-Py37-tf2.2.0:
python.version: '3.7'
ONNX_PATH: onnx==1.9.0
ONNX_PATH: onnx==1.10.1
KERAS: keras==2.4.3
TENSORFLOW_PATH: tensorflow==2.2.0
INSTALL_ORT: pip install onnxruntime==1.8.0
INSTALL_ORT: pip install onnxruntime==1.9.0

steps:
- template: 'templates/keras2onnx_unit_test.yml'
Expand Down
2 changes: 2 additions & 0 deletions tests/run_pretrained_models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ ssd_mobilenet_v3_large_coco:
opset_constraints:
"onnx":
"min": 10
"max": 14 # FIXME, temorary until onnx-1.10.2 is out
input_get: get_beach
inputs:
"normalized_input_image_tensor:0": [1, 320, 320, 3]
Expand Down Expand Up @@ -420,6 +421,7 @@ faster_rcnn_inception_v2_coco:
opset_constraints:
"onnx":
"min": 11
"max": 14 # FIXME: temporary until onnx-1.10.2 is out
input_get: get_beach
inputs:
"image_tensor:0": [1, 224, 224, 3]
Expand Down
2 changes: 1 addition & 1 deletion tf2onnx/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
# Mapping opset to IR version.
# Note: opset 7 and opset 8 came out with IR3 but we need IR4 because of PlaceholderWithDefault
OPSET_TO_IR_VERSION = {
1: 3, 2: 3, 3: 3, 4: 3, 5: 3, 6: 3, 7: 4, 8: 4, 9: 4, 10: 5, 11: 6, 12: 7, 13: 7, 14: 7
1: 3, 2: 3, 3: 3, 4: 3, 5: 3, 6: 3, 7: 4, 8: 4, 9: 4, 10: 5, 11: 6, 12: 7, 13: 7, 14: 7, 15: 8
}