We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb1f844 commit 7c6facdCopy full SHA for 7c6facd
keras/src/backend/openvino/numpy.py
@@ -13,6 +13,17 @@
13
from keras.src.backend.openvino.core import get_ov_output
14
from keras.src.backend.openvino.core import ov_to_keras_type
15
16
+def dot(x, y):
17
+ """
18
+ OpenVINO implementation of numpy.dot using MatMul and element-wise multiplication.
19
20
+ x, y = _align_operand_types(x, y)
21
+ if len(x.shape) == 1 and len(y.shape) == 1:
22
+ return ov_to_keras_type(ov_opset.reduce_sum(ov_opset.multiply(x, y), axes=[0]))
23
+ if len(x.shape) == 2 and len(y.shape) == 1:
24
+ y = ov_opset.unsqueeze(y, [1])
25
+ return ov_to_keras_type(ov_opset.squeeze(ov_opset.matmul(x, y), [1]))
26
+ return ov_to_keras_type(ov_opset.matmul(x, y))
27
28
def add(x1, x2):
29
element_type = None
0 commit comments