Skip to content

Commit 2b5caf1

Browse files
Francesco Salvettif-salvetti
authored andcommitted
Support for ReduceJoin op
Signed-off-by: Salvetti, Francesco <[email protected]>
1 parent 467bc41 commit 2b5caf1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tf2onnx/custom_opsets/string_ops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ def version_1(cls, ctx, node, **kwargs):
9696

9797
axis_node = ctx.get_node_by_output(node.input[1])
9898
axis = axis_node.get_attr_value('value')
99-
if axis.dims not in [[], [1]]:
100-
raise TypeError("Onnx ReduceJoin operation supports a single axis, only.")
99+
utils.make_sure(axis.dims in [[], [1]], "Only a single axis is supported for ReduceJoin node")
101100
axis = to_array(axis)
102101
new_axis_node = ctx.make_const(utils.make_name("axis"), np.array(axis, np.int64).reshape((1)))
103102

0 commit comments

Comments
 (0)