Skip to content

Commit

Permalink
Support for models with opset<=10
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed Nov 16, 2022
1 parent 58b0c6b commit b275740
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
$ docker run --rm -it \
-v `pwd`:/workdir \
-w /workdir \
ghcr.io/pinto0309/onnx2tf:1.1.22
ghcr.io/pinto0309/onnx2tf:1.1.23
or
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from onnx2tf.onnx2tf import convert, main

__version__ = '1.1.22'
__version__ = '1.1.23'
18 changes: 13 additions & 5 deletions onnx2tf/ops/Resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,25 @@ def make_node(
before_op_output_shape_trans = \
before_op_output_shape_trans_1

opset = kwargs['opset']

input_tensor = get_constant_or_variable(
graph_node.inputs[0],
before_op_output_shape_trans,
)
roi = None
if len(graph_node.inputs) >= 2:
roi = get_constant_or_variable(
graph_node.inputs[1],
before_op_output_shape_trans,
)
scales = None
if len(graph_node.inputs) >= 2:
if opset > 10:
roi = get_constant_or_variable(
graph_node.inputs[1],
before_op_output_shape_trans,
)
else:
scales = get_constant_or_variable(
graph_node.inputs[1],
before_op_output_shape_trans,
)
if len(graph_node.inputs) >= 3:
scales = get_constant_or_variable(
graph_node.inputs[2],
Expand Down

0 comments on commit b275740

Please sign in to comment.