Skip to content

Commit 93797be

Browse files
committed
Fixed k_value not scalar
1 parent 9fd5282 commit 93797be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

keras/src/backend/openvino/numpy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,8 +1147,9 @@ def median(x, axis=None, keepdims=False):
11471147
else:
11481148
ov_axis_positive = ov_axis
11491149

1150+
k_scalar = ov_opset.squeeze(k_value).output(0)
11501151
x_sorted = ov_opset.topk(
1151-
x, k_value, axis, "min", "value", stable=True
1152+
x, k_scalar, axis, "min", "value", stable=True
11521153
).output(0)
11531154
half_index = ov_opset.floor(
11541155
ov_opset.divide(k_value, ov_opset.constant([2], Type.i32)).output(0)

0 commit comments

Comments
 (0)