Skip to content

Commit 3801dcd

Browse files
[OpenVINO backend] support bool for convert_to_tensor (#21423)
1 parent 6c41fc8 commit 3801dcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

keras/src/backend/openvino/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ def convert_to_tensor(x, dtype=None, sparse=None, ragged=None):
615615
dtype = "int32"
616616
x = np.array(x, dtype=dtype)
617617
return OpenVINOKerasTensor(ov_opset.constant(x).output(0), x)
618-
elif isinstance(x, (float, int)):
618+
elif isinstance(x, (float, int, bool)):
619619
dtype = standardize_dtype(dtype)
620620
ov_type = OPENVINO_DTYPES[dtype]
621621
return OpenVINOKerasTensor(ov_opset.constant(x, ov_type).output(0), x)

0 commit comments

Comments
 (0)