Skip to content

Commit

Permalink
Merge pull request #672 from PINTO0309/fix_undefined_resize
Browse files Browse the repository at this point in the history
Bug fix for Resize optimization pattern
  • Loading branch information
PINTO0309 authored Jul 18, 2024
2 parents 7b775fa + d3e2177 commit 3ce052d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ 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.25.5
ghcr.io/pinto0309/onnx2tf:1.25.6

or

# Authentication is not required for pulls from Docker Hub.
docker run --rm -it \
-v `pwd`:/workdir \
-w /workdir \
docker.io/pinto0309/onnx2tf:1.25.5
docker.io/pinto0309/onnx2tf:1.25.6

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.25.5'
__version__ = '1.25.6'
8 changes: 4 additions & 4 deletions onnx2tf/ops/Concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ def make_node(
)
tf_type = tf.slice

elif simple_resize2 and len(values) == 2:
target_input: np.ndarray = None
elif simple_resize2 and len(values) >= 2:
target_input: np.ndarray = np.array([], dtype=np.int64)
target_spartial_size: int = 0
for cat_value in values:
if hasattr(cat_value, 'numpy'):
target_input = cat_value.numpy()
if not hasattr(cat_value, 'numpy') and cat_value.shape is not None:
target_input = np.append(target_input, cat_value.numpy())
elif not hasattr(cat_value, 'numpy') and cat_value.shape is not None:
target_spartial_size = cat_value.shape[0] - 2
if target_spartial_size == len(target_input):
target_input = np.asarray([1] + [i for i in target_input] + [1])
Expand Down

0 comments on commit 3ce052d

Please sign in to comment.