Skip to content

Commit 232a536

Browse files
authored
Merge branch 'main' into post-padded-lstm
2 parents d4e16b5 + ddca3a5 commit 232a536

File tree

19 files changed

+154
-45
lines changed

19 files changed

+154
-45
lines changed
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
---
22
name: Bug/Performance issue
33
about: Use this template for reporting a bug or a performance issue.
4-
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
57
---
68

9+
<!--
710
**Dubugging advice**
8-
[delete this section if it doesn't solve your issue]
911
- Add a `--opset` flag with the highest possible opset you can use. Some ops only convert in higher opsets.
1012
- Try installing the latest tf2onnx from main. Some bug fixes might not have been released to PyPI. Run `pip uninstall tf2onnx` and `pip install git+https://github.com/onnx/tensorflow-onnx`
1113
- If using a saved model, use the Tensorflow `saved_model_cli` to determine the correct `--tag` and `--signature_def` flags to use. If the signature you need is not listed, use the `--concrete_function` flag to index into the model's defined functions.
12-
- If your model was made in tf1.x, try running tf2onnx in a venv with tensorflow 1.x installed. tf2.x should be able to read tf1 models, but sometimes there are bugs.
14+
- If your model was made in tf1.x, try running tf2onnx in a venv with tensorflow 1.x installed. tf2.x should be able to read tf1.x models, but sometimes there are bugs.
15+
-->
1316

1417
**Describe the bug**
15-
A clear and concise description of what the bug is.
18+
<!-- Please describe a clear and concise description of what the bug is. -->
1619

1720
**Urgency**
18-
If there are particular important use cases blocked by this or strict project-related timelines, please share more information and dates. If there are no hard deadlines, please specify none.
21+
<!-- If there are particular important use cases blocked by this or strict project-related timelines, please share more information and dates. If there are no hard deadlines, please specify none. -->
1922

2023
**System information**
21-
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
22-
- Tensorflow Version:
24+
- OS Platform and Distribution (e.g., Linux Ubuntu 18.04*):
25+
- TensorFlow Version:
2326
- Python version:
27+
- ONNX version (if applicable, e.g. 1.11*):
28+
- ONNXRuntime version (if applicable, e.g. 1.11*):
29+
2430

2531
**To Reproduce**
26-
Describe steps/code to reproduce the behavior. Please upload/link the model you are trying to convert if possible.
32+
<!-- Describe steps/code/command to reproduce the behavior. Please upload/link the model you are trying to convert if possible. -->
2733

2834
**Screenshots**
29-
If applicable, add screenshots to help explain your problem.
35+
<!-- If applicable, add screenshots to help explain your problem. -->
3036

3137
**Additional context**
32-
Add any other context about the problem here. If the issue is about a particular model, please share the model details as well to facilitate debugging.
38+
<!-- Add any other context about the problem here. If the issue is about a particular model, please share the model details as well to facilitate debugging. -->
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Feature request
3+
about: Requests for new tf2onnx features
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
Before submitting your request, please review past submissions to ensure that it is not a duplicate of a known feature request.
11+
12+
### Describe the feature request
13+
14+
15+
### Describe scenario use case

.github/ISSUE_TEMPLATE/operators.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Missing Operator
3+
about: Operator that does not currently support in tf2onnx.
4+
title: ''
5+
labels: 'unsupported ops'
6+
assignees: ''
7+
8+
9+
10+
---
11+
# New Operator
12+
13+
### Describe the operator
14+
<!-- Why is this operator necessary? What does it accomplish? -->
15+
16+
### Do you know this operator be constructed using existing ONNX operators?
17+
<!-- If so, why not add it as a function? -->
18+
19+
### Is this operator used by any model currently? Which one?
20+
21+
### Are you willing to contribute it? (Y/N)
22+
23+
### Notes
24+
<!-- Any additional information -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Question
3+
about: Ask a question about the tf2onnx.
4+
title: ''
5+
labels: 'question'
6+
assignees: ''
7+
8+
9+
10+
---
11+
# Ask a Question
12+
13+
### Question
14+
<!-- Explain your question here. -->
15+
16+
### Further information
17+
- Is this issue related to a specific model?
18+
**Model name**: <!-- *e.g. mnist* -->
19+
20+
**Model opset**: <!-- *e.g. 17* -->
21+
22+
### Notes
23+
<!-- Any additional information, code snippets. -->

ci_build/azure_pipelines/keras2onnx_unit_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
ONNX_PATH: -i onnx==1.12.0
6969
KERAS: keras==2.9.0
7070
TENSORFLOW_PATH: tensorflow==2.9.0
71-
INSTALL_ORT: pip install onnxruntime==1.11.0
71+
INSTALL_ORT: pip install onnxruntime==1.12.0
7272
INSTALL_NUMPY: pip install numpy==1.23.0
7373

7474
steps:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def run(self):
8282
author='ONNX',
8383
author_email='[email protected]',
8484
url='https://github.com/onnx/tensorflow-onnx',
85-
install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers~=1.12'],
85+
install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers<3.0,>=1.12'],
8686
classifiers=[
8787
'Development Status :: 5 - Production/Stable',
8888
'Intended Audience :: Developers',

tests/keras2onnx_applications/nightly_build/test_acgan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from os.path import dirname, abspath
1111
sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../keras2onnx_tests/'))
1212
from test_utils import run_onnx_runtime
13-
from distutils.version import StrictVersion
13+
from packaging.version import Version
1414

1515
Activation = keras.layers.Activation
1616
BatchNormalization = keras.layers.BatchNormalization
@@ -133,7 +133,7 @@ def tearDown(self):
133133
for fl in self.model_files:
134134
os.remove(fl)
135135

136-
@unittest.skipIf(StrictVersion(onnx.__version__) < StrictVersion("1.5.0"),
136+
@unittest.skipIf(Version(onnx.__version__) < Version("1.5.0"),
137137
"Not supported before onnx 1.5.0")
138138
def test_ACGAN(self):
139139
keras_model = ACGAN().combined

tests/keras2onnx_applications/nightly_build/test_mask_rcnn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
keras.backend.clear_session()
2222
sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../mask_rcnn/'))
2323
from mask_rcnn import model
24-
from distutils.version import StrictVersion
24+
from packaging.version import Version
2525

2626
working_path = os.path.abspath(os.path.dirname(__file__))
2727
tmp_path = os.path.join(working_path, 'temp')
@@ -36,7 +36,7 @@ def tearDown(self):
3636
for fl in self.model_files:
3737
os.remove(fl)
3838

39-
@unittest.skipIf(StrictVersion(onnx.__version__.split('-')[0]) < StrictVersion("1.6.0"),
39+
@unittest.skipIf(Version(onnx.__version__.split('-')[0]) < Version("1.6.0"),
4040
"Mask-rcnn conversion needs contrib op for onnx < 1.6.0.")
4141
def test_mask_rcnn(self):
4242
set_converter('CropAndResize', convert_tf_crop_and_resize)

tests/keras2onnx_applications/nightly_build/test_unet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from os.path import dirname, abspath
99
from mock_keras2onnx.proto import keras, is_keras_older_than
1010
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
11-
from distutils.version import StrictVersion
11+
from packaging.version import Version
1212

1313
sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../keras2onnx_tests/'))
1414
from test_utils import run_image
@@ -126,7 +126,7 @@ def test_unet_2(self):
126126
res = run_image(model, self.model_files, img_path, color_mode="grayscale", target_size=(img_rows, img_cols))
127127
self.assertTrue(*res)
128128

129-
@unittest.skipIf(StrictVersion(onnxruntime.__version__.split('-')[0]) < StrictVersion('1.7.0'),
129+
@unittest.skipIf(Version(onnxruntime.__version__.split('-')[0]) < Version('1.7.0'),
130130
"ConvTranspose stride > 1 is fixed in onnxruntime 1.7.0.")
131131
def test_unet_3(self):
132132
# From https://github.com/yu4u/noise2noise/blob/master/model.py

tests/keras2onnx_applications/nightly_build/test_unet_plus_plus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from mock_keras2onnx.proto import keras, is_keras_older_than
1010
from keras.applications.vgg16 import VGG16
1111
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
12-
from distutils.version import StrictVersion
12+
from packaging.version import Version
1313

1414
sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../keras2onnx_tests/'))
1515
from test_utils import run_image
@@ -102,7 +102,7 @@ def tearDown(self):
102102
for fl in self.model_files:
103103
os.remove(fl)
104104

105-
@unittest.skipIf(StrictVersion(onnxruntime.__version__.split('-')[0]) < StrictVersion('1.7.0'),
105+
@unittest.skipIf(Version(onnxruntime.__version__.split('-')[0]) < Version('1.7.0'),
106106
"ConvTranspose stride > 1 is fixed in onnxruntime 1.7.0.")
107107
def test_unet_plus_plus(self):
108108
backbone_name = 'vgg16'

0 commit comments

Comments
 (0)