Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#729 shape unmatch workaround test #730

Merged
merged 4 commits into from
Jan 17, 2025
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
5 changes: 0 additions & 5 deletions .github/workflows/test-models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
sudo rm -rf "/usr/local/share/phantomjs*" || true
sudo rm -rf "/usr/share/sbt" || true
sudo rm -rf "/usr/local/sqlpackage" || true
docker rmi $(docker image ls -q --filter "reference=node*")
docker rmi $(docker image ls -q --filter "reference=moby/buildkit*")
docker rmi $(docker image ls -q --filter "reference=debian*")
docker rmi $(docker image ls -q --filter "reference=alpine*")
docker rmi $(docker image ls -q --filter "reference=ubuntu:20.04")
sudo npm uninstall bazel
rustup self uninstall -y
sudo apt purge \
Expand Down
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.26.3
ghcr.io/pinto0309/onnx2tf:1.26.4

or

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

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.26.3'
__version__ = '1.26.4'
9 changes: 9 additions & 0 deletions onnx2tf/utils/common_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2386,6 +2386,15 @@ def shape_unmatched_special_avoidance_workaround(
input_tensor_2: Any
Input shape-corrected TensorFlow input node Y
"""
try:
if hasattr(input_tensor_1, "shape") \
and hasattr(input_tensor_2, "shape") \
and input_tensor_1.shape is not None \
and input_tensor_2.shape is not None \
and input_tensor_1.shape == input_tensor_2.shape:
return input_tensor_1, input_tensor_2
except:
pass
# At least one True value for same_input_shape_as_onnx
# At least one True value in nhwc_flags
# same_input_shape_as_onnx == True and nhwc_flags == False and 3D or 4D or 5D tensor is NHWC transposed
Expand Down
Loading