File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
keras/src/backend/openvino Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ def __mul__(self, other):
188
188
first , other = align_operand_types (
189
189
first , other , "OpenVINOKerasTensor::__mul__"
190
190
)
191
+ if first .get_element_type () == Type .boolean :
192
+ return OpenVINOKerasTensor (
193
+ ov_opset .logical_and (first , other ).output (0 )
194
+ )
191
195
return OpenVINOKerasTensor (ov_opset .multiply (first , other ).output (0 ))
192
196
193
197
def __rmul__ (self , other ):
@@ -196,6 +200,10 @@ def __rmul__(self, other):
196
200
first , other = align_operand_types (
197
201
first , other , "OpenVINOKerasTensor::__rmul__"
198
202
)
203
+ if first .get_element_type () == Type .boolean :
204
+ return OpenVINOKerasTensor (
205
+ ov_opset .logical_and (first , other ).output (0 )
206
+ )
199
207
return OpenVINOKerasTensor (ov_opset .multiply (first , other ).output (0 ))
200
208
201
209
def __truediv__ (self , other ):
You can’t perform that action at this time.
0 commit comments