Skip to content

Commit 1635157

Browse files
convertcde
1 parent df028d0 commit 1635157

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

keras/src/backend/openvino/numpy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
from keras.src.backend.openvino.core import convert_to_tensor
1616
from keras.src.backend.openvino.core import get_ov_output
1717
from keras.src.backend.openvino.core import ov_to_keras_type
18-
from .core import _convert_to_node
18+
import numpy as np
19+
from openvino.runtime import opset13 as ov
20+
21+
1922

2023
def diagonal(x, offset=0, axis1=0, axis2=1):
2124
"""OpenVINO backend decomposition for keras.ops.diagonal."""
22-
x_node = _convert_to_node(x) # -> ov.Node
25+
x_node = ov.constant(x) # -> ov.Node
2326
offset_const = ov_opset.constant(int(offset), dtype="i64")
2427

2528
# rank & normalize axes

0 commit comments

Comments
 (0)