forked from mindspore-Ecosystem/mindspore
logicalor bug fix
This commit is contained in:
parent
a0a8ef729d
commit
27bcd5f981
|
@ -149,7 +149,7 @@ int ElementLogicalOr(const float *in0, const float *in1, float *out, int size) {
|
|||
}
|
||||
#endif
|
||||
for (; index < size; index++) {
|
||||
out[index] = (float)((unsigned int)(in0[index]) | (unsigned int)(in1[index]));
|
||||
out[index] = (float)((bool)(in0[index]) | (bool)(in1[index]));
|
||||
}
|
||||
return NNACL_OK;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ int ElementLogicalOr(const float *in0, const float *in1, float *out, int size) {
|
|||
int ElementLogicalOrBool(const bool *in0, const bool *in1, bool *out, int size) {
|
||||
int index = 0;
|
||||
for (; index < size; index++) {
|
||||
out[index] = (bool)((unsigned int)(in0[index]) | (unsigned int)(in1[index]));
|
||||
out[index] = (bool)(in0[index] | in1[index]);
|
||||
}
|
||||
return NNACL_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue