Skip to content

Commit bb0c81e

Browse files
Fix nightly pipeline for tf1.13 (#1565)
* Fix nightly build for tf2.1 Signed-off-by: Tom Wildenhain <[email protected]> * Fix nightly pipeline for tf1.13 Signed-off-by: Tom Wildenhain <[email protected]>
1 parent 6a4fc17 commit bb0c81e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/test_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4053,7 +4053,7 @@ def func(x):
40534053
self.logger.debug(str(p))
40544054
self._run_test_case(func, [_OUTPUT, _OUTPUT1], {_INPUT: x_val})
40554055

4056-
@check_tf_min_version("1.13")
4056+
@check_tf_min_version("1.15")
40574057
@check_opset_min_version(11, "MaxPoolWithArgmax")
40584058
def test_maxpoolwithargmax_batch_in_index(self):
40594059
padding = 'SAME'

tf2onnx/onnx_opset/nn.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ def version_8(cls, ctx, node, **kwargs):
747747
c_range = ctx.make_node("Range", [const_zero, c_sq, const_one]).output[0]
748748
xyc = ctx.make_node("Add", [xy_scale_c, c_range]).output[0]
749749
single_batch = input_shape_guess is not None and input_shape_guess[0] == 1
750-
if node.get_attr_value('include_batch_in_index', False) and not single_batch:
750+
# Documentation says include_batch_in_index has default False, but tf 1.13 excludes it and assumes True
751+
if node.get_attr_value('include_batch_in_index', True) and not single_batch:
751752
utils.make_sure(ctx.opset >= 11, "opset 11 required for MaxPoolWithArgmax with include_batch_in_index")
752753
n_sq = GraphBuilder(ctx).make_squeeze({'data': n, 'axes': [0]})
753754
n_range = ctx.make_node("Range", [const_zero, n_sq, const_one]).output[0]

0 commit comments

Comments
 (0)