Browse Source

fix bug of resize

tags/v1.1.0
wang_shaocong 5 years ago
parent
commit
c80dd2dba3
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      mindspore/lite/nnacl/int8/resize_int8.c
  2. +4
    -0
      mindspore/lite/src/ops/populate/strided_slice_populate.h

+ 1
- 1
mindspore/lite/nnacl/int8/resize_int8.c View File

@@ -93,7 +93,7 @@ int ResizeBilinearWithFloatScaleInt8(const int8_t *input_ptr, int8_t *output_ptr
int input_rt_index = (y_upper_value * in_w + x_upper_value) * channel; int input_rt_index = (y_upper_value * in_w + x_upper_value) * channel;
int c = 0; int c = 0;
#ifdef ENABLE_ARM #ifdef ENABLE_ARM
for (; c < channel; c += 4) {
for (; c <= channel - 4; c += 4) {
float32x4_t in_lb; float32x4_t in_lb;
in_lb[0] = (float)in_b_ptr[input_lb_index]; in_lb[0] = (float)in_b_ptr[input_lb_index];
in_lb[1] = (float)in_b_ptr[input_lb_index + 1]; in_lb[1] = (float)in_b_ptr[input_lb_index + 1];


+ 4
- 0
mindspore/lite/src/ops/populate/strided_slice_populate.h View File

@@ -14,6 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */


#ifndef LITE_MINDSPORE_LITE_C_OPS_OP_STRIDED_SLICE_POPULATE_H
#define LITE_MINDSPORE_LITE_C_OPS_OP_STRIDED_SLICE_POPULATE_H

#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"


namespace mindspore { namespace mindspore {
@@ -23,3 +26,4 @@ OpParameter *PopulateStridedSliceParameter(const mindspore::lite::PrimitiveC *pr


} // namespace lite } // namespace lite
} // namespace mindspore } // namespace mindspore
#endif

Loading…
Cancel
Save