diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/NEON/kernels/NEScaleKernel.cpp | 2 | ||||
-rw-r--r-- | src/core/utils/helpers/tensor_transform.cpp | 9 | ||||
-rw-r--r-- | src/runtime/CL/functions/CLCropResize.cpp | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/NEScaleKernel.cpp b/src/core/NEON/kernels/NEScaleKernel.cpp index a2a44fca18..80da54f50a 100644 --- a/src/core/NEON/kernels/NEScaleKernel.cpp +++ b/src/core/NEON/kernels/NEScaleKernel.cpp @@ -227,7 +227,7 @@ inline void scale_bilinear_nhwc_core(const ITensor *input, const ITensor *offset border_value = static_cast<T>(constant_border_value.get<ConstType>()); } - auto is_valid = [](int x, int low_x, int high_x, int y, int low_y, int high_y) + auto is_valid = [](int64_t x, int64_t low_x, int64_t high_x, int64_t y, int64_t low_y, int64_t high_y) { return !(x < low_x || x > high_x || y < low_y || y > high_y); }; diff --git a/src/core/utils/helpers/tensor_transform.cpp b/src/core/utils/helpers/tensor_transform.cpp index f6a54a59ee..cd874b24b3 100644 --- a/src/core/utils/helpers/tensor_transform.cpp +++ b/src/core/utils/helpers/tensor_transform.cpp @@ -88,7 +88,14 @@ int calculate_end_on_index(TensorShape input_shape, int index, int start_on_inde // Shrink dimension if(shrink_axis) { - stop = start_on_index + 1; + if(start_on_index == std::numeric_limits<int>::max()) + { + stop = start_on_index; + } + else + { + stop = start_on_index + 1; + } } // Reset in case of begin mask present diff --git a/src/runtime/CL/functions/CLCropResize.cpp b/src/runtime/CL/functions/CLCropResize.cpp index b22809eb09..5e1278df5b 100644 --- a/src/runtime/CL/functions/CLCropResize.cpp +++ b/src/runtime/CL/functions/CLCropResize.cpp @@ -48,7 +48,7 @@ inline void configure_crop(const ICLTensor *input, ICLTensor *crop_boxes, ICLTen std::floor(y0 * (input->info()->tensor_shape()[2] - 1) + 0.5f)); end = Coordinates(std::floor(x1 * (input->info()->tensor_shape()[1] - 1) + 0.5f), std::floor(y1 * (input->info()->tensor_shape()[2] - 1) + 0.5f)); - const TensorShape out_shape(input->info()->tensor_shape()[0], abs(end[0] - start[0]) + 1, abs(end[1] - start[1]) + 1); + const TensorShape out_shape(input->info()->tensor_shape()[0], static_cast<uint32_t>(abs(end[0] - start[0])) + 1, static_cast<uint32_t>(abs(end[1] - start[1])) + 1); output->info()->set_tensor_shape(out_shape); } |