diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-09-04 20:51:24 +0100 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-09-07 10:38:21 +0000 |
commit | cbf4d553e123a9fa7a92072aea61edcf50ed6c32 (patch) | |
tree | 14a5cf0791a5facf6d53546bec09c92e10903eed | |
parent | 2bfadd92d638fd4e7b8b3398ce95f15930749189 (diff) | |
download | ComputeLibrary-cbf4d553e123a9fa7a92072aea61edcf50ed6c32.tar.gz |
COMPMID-3755: Resize failing on input with trailing 1's
Base the dimensions of the valid region generated by the reshape
kernel on the output shape dimensions.
This allows correct scaling on inputs that are in NHWC format and have
width and height equal to 1 e.g. 1x1x32.
Underlying problem causing this issue is the fact that Compute Library
removes trailing 1's of a given shape.
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Icfdafc469214840998e7c198b33f7358d566d2e7
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3924
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r-- | src/core/Helpers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/Helpers.cpp b/src/core/Helpers.cpp index 5c7200b35c..6701ff4483 100644 --- a/src/core/Helpers.cpp +++ b/src/core/Helpers.cpp @@ -246,7 +246,7 @@ ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const Tens } // Setup output valid region - ValidRegion valid_region{ Coordinates(), dst_shape, src_info.tensor_shape().num_dimensions() }; + ValidRegion valid_region{ Coordinates(), dst_shape, dst_shape.num_dimensions() }; valid_region.anchor.set(idx_width, std::max(0, valid_start_out_x)); valid_region.anchor.set(idx_height, std::max(0, valid_start_out_y)); |