File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
keras/src/backend/openvino Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1024,9 +1024,20 @@ def logaddexp(x1, x2):
1024
1024
x1 = get_ov_output (x1 )
1025
1025
x2 = get_ov_output (x2 )
1026
1026
1027
+ x1_type = x1 .get_element_type ()
1028
+ x2_type = x2 .get_element_type ()
1029
+
1030
+ if x1_type .is_integral () or x2_type .is_integral ():
1031
+ float_dtype = OPENVINO_DTYPES [config .floatx ()]
1032
+ if x1_type .is_integral ():
1033
+ x1 = ov_opset .convert (x1 , float_dtype )
1034
+ if x2_type .is_integral ():
1035
+ x2 = ov_opset .convert (x2 , float_dtype )
1036
+
1027
1037
x1 , x2 = _align_operand_types (x1 , x2 , "logaddexp()" )
1028
1038
1029
1039
max_val = ov_opset .maximum (x1 , x2 ).output (0 )
1040
+
1030
1041
abs_diff = ov_opset .abs (ov_opset .subtract (x1 , x2 ).output (0 )).output (0 )
1031
1042
neg_abs_diff = ov_opset .negative (abs_diff ).output (0 )
1032
1043
exp_neg_abs = ov_opset .exp (neg_abs_diff ).output (0 )
You can’t perform that action at this time.
0 commit comments