Skip to content

Commit c5bcf1d

Browse files
committed
Fix tuple convert to OpenVINO
1 parent 49074d9 commit c5bcf1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

keras/src/backend/openvino/numpy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,10 @@ def median(x, axis=None, keepdims=False):
10791079
# where axis is tuple or list of integers, move 'axis' dims to the
10801080
# rightmost positions and flatten them
10811081
flattened = False
1082-
ov_axis = get_ov_output(axis)
1082+
if isinstance(axis, (tuple, list)):
1083+
ov_axis = convert_to_tensor(axis)
1084+
else:
1085+
ov_axis = get_ov_output(axis)
10831086
x_rank = ov_opset.gather(
10841087
ov_opset.shape_of(x_shape_original, Type.i32).output(0),
10851088
ov_opset.constant([0], Type.i32).output(0),

0 commit comments

Comments
 (0)