Skip to content

Commit 0dc49fb

Browse files
[OpenVINO backend] add supporting for lists and tuples (#21495)
1 parent 74d26de commit 0dc49fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

keras/src/backend/openvino/core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ def get_ov_output(x, ov_type=None):
110110
x = ov_opset.constant(x, OPENVINO_DTYPES["bfloat16"]).output(0)
111111
else:
112112
x = ov_opset.constant(x).output(0)
113+
elif isinstance(x, (list, tuple)):
114+
if isinstance(x, tuple):
115+
x = list(x)
116+
if ov_type is None:
117+
x = ov_opset.constant(x).output(0)
118+
else:
119+
x = ov_opset.constant(x, ov_type).output(0)
113120
elif np.isscalar(x):
114121
x = ov_opset.constant(x).output(0)
115122
elif isinstance(x, KerasVariable):

0 commit comments

Comments
 (0)