Skip to content

Commit

Permalink
Merge pull request #334 from PINTO0309/fix_acc_check2
Browse files Browse the repository at this point in the history
Fixed to never update batch size unless the batch size dimension is an undefined dimension
  • Loading branch information
PINTO0309 authored May 2, 2023
2 parents c56a126 + a6fbc4b commit b1cf6e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,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.9.16
ghcr.io/pinto0309/onnx2tf:1.9.17
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.9.16'
__version__ = '1.9.17'
6 changes: 4 additions & 2 deletions onnx2tf/utils/common_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3504,7 +3504,8 @@ def dummy_onnx_inference(
for idx, dim in enumerate(input_size):
if idx == 0 and input_sizes[0][0] is not None \
and not isinstance(input_sizes[0][0], str) \
and len(input_sizes[0]) == len(input_size):
and len(input_sizes[0]) == len(input_size) \
and (dim is None or isinstance(dim, str)):
# Batch size assignment for input OPs
new_input_size.append(input_sizes[0][0])
elif dim is None or isinstance(dim, str):
Expand Down Expand Up @@ -3581,7 +3582,8 @@ def dummy_tf_inference(
new_input_size = []
for idx, dim in enumerate(input_size):
if idx == 0 and input_sizes[0][0] is not None \
and len(input_sizes[0]) == len(input_size):
and len(input_sizes[0]) == len(input_size) \
and dim is None:
# Batch size assignment for input OPs
new_input_size.append(input_sizes[0][0])
elif dim is None:
Expand Down

0 comments on commit b1cf6e7

Please sign in to comment.