forked from mindspore-Ecosystem/mindspore
!11020 [MS][LITE][Develop]fix CodeDEX warnings
From: @lx0095 Reviewed-by: @zhanghaibo5,@zhang_xue_tong Signed-off-by: @zhang_xue_tong
This commit is contained in:
commit
257fcea17a
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "nnacl/fp32/arithmetic_fp32.h"
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#define ACCURACY_DATA 0.00000001
|
||||
|
||||
|
|
|
@ -284,17 +284,17 @@ int ResizeNearestNeighbor(const float *input_data, float *output_data, const int
|
|||
}
|
||||
|
||||
float CalculateAsymmetric(int x_resized, int length_original, int length_resized) {
|
||||
float scale = (float)(length_resized) / length_original;
|
||||
float scale = (float)(length_resized) / (float)(length_original);
|
||||
return (float)(x_resized) / scale;
|
||||
}
|
||||
|
||||
float CalculateAlignCorners(int x_resized, int length_original, int length_resized) {
|
||||
float scale = (float)(length_resized - 1) / (length_original - 1);
|
||||
float scale = (float)(length_resized - 1) / (float)(length_original - 1);
|
||||
return (float)(x_resized) / scale;
|
||||
}
|
||||
|
||||
float CalculateHalfPixel(int x_resized, int length_original, int length_resized) {
|
||||
float scale = (float)(length_resized) / length_original;
|
||||
float scale = (float)(length_resized) / (float)(length_original);
|
||||
float actual = (float)(x_resized + 0.5) / scale - 0.5;
|
||||
return actual > 0 ? actual : 0;
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "nnacl/pack.h"
|
|
@ -129,7 +129,7 @@ int TransposeCPUKernel::Run() {
|
|||
for (int i = 0; i < input_perm->ElementsNum(); ++i) {
|
||||
param->perm_[i] = perm_data[i];
|
||||
}
|
||||
for (int i = input_perm->ElementsNum(); i <= 8; ++i) {
|
||||
for (int i = input_perm->ElementsNum(); i < 8; ++i) {
|
||||
param->perm_[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ getCommonFile() {
|
|||
others_files_c=(
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/ops/primitive_c.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/nnacl/nnacl_utils.c
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/nnacl/pack.c
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/runtime/kernel/arm/fp16/common_fp16.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/ops/populate/arithmetic_populate.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/ops/populate/arithmetic_self_populate.cc
|
||||
|
|
Loading…
Reference in New Issue