Browse Source

remove zero or negative check in rsqrt_fp16 op

pull/13651/head
hangangqiang 4 years ago
parent
commit
a432828f18
1 changed files with 0 additions and 3 deletions
  1. +0
    -3
      mindspore/lite/nnacl/fp16/arithmetic_self_fp16.c

+ 0
- 3
mindspore/lite/nnacl/fp16/arithmetic_self_fp16.c View File

@@ -59,9 +59,6 @@ int ElementSqrtFp16(float16_t *input, float16_t *output, int element_size) {

int ElementRsqrtFp16(float16_t *input, float16_t *output, int element_size) {
for (int i = 0; i < element_size; i++) {
if (input[i] <= 0) {
return NNACL_ERRCODE_RSQRT_NEGATIVE_OR_ZERO;
}
output[i] = 1.f / sqrtf(input[i]);
}
return NNACL_OK;


Loading…
Cancel
Save