Skip to content

Commit c7209df

Browse files
author
Saif Mohammed
committed
Fix sytling issues
1 parent f29921a commit c7209df

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

keras/src/backend/openvino/numpy.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,15 +519,12 @@ def dot(x, y):
519519
element_type = y.output.get_element_type()
520520
x = get_ov_output(x, element_type)
521521
y = get_ov_output(y, element_type)
522-
x_shape = ov_opset.shape_of(x)
523-
y_shape = ov_opset.shape_of(y)
522+
x, y = _align_operand_types(x, y, "dot()")
524523
if (
525-
x_shape.get_input_partial_shape(0).rank == 0
526-
or y_shape.get_input_partial_shape(0).rank == 0
524+
x.get_input_partial_shape(0).rank == 0
525+
or x.get_input_partial_shape(0).rank == 0
527526
):
528-
x, y = _align_operand_types(x, y, "dot()")
529527
return OpenVINOKerasTensor(ov_opset.multiply(x, y).output(0))
530-
x, y = _align_operand_types(x, y, "dot()")
531528
return OpenVINOKerasTensor(ov_opset.matmul(x, y, False, False).output(0))
532529

533530

0 commit comments

Comments
 (0)