aboutsummaryrefslogtreecommitdiff
path: root/src/core/Utils.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-10-03 14:18:19 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:45 +0000
commitafbc5ffb0b567ae93fa2765066bd136d72be88ff (patch)
tree328005d70d5526609a9d84173a317fd1f10b4ed2 /src/core/Utils.cpp
parent67d94d29c154a376d12e582421323c1d250da20c (diff)
downloadComputeLibrary-afbc5ffb0b567ae93fa2765066bd136d72be88ff.tar.gz
COMPMID-1621 Deconvolution wrong output calculation
Change-Id: Ida71312bcf6dbd854f2ab1efc65f74910c79e152 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/151510 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'src/core/Utils.cpp')
-rw-r--r--src/core/Utils.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp
index 229579d8d9..a6a5771ec1 100644
--- a/src/core/Utils.cpp
+++ b/src/core/Utils.cpp
@@ -334,17 +334,14 @@ TensorShape arm_compute::deconvolution_output_shape(const std::pair<unsigned int
const std::pair<unsigned int, unsigned int> arm_compute::deconvolution_output_dimensions(
unsigned int in_width, unsigned int in_height, unsigned int kernel_width, unsigned int kernel_height, unsigned int padx, unsigned int pady,
- unsigned int inner_border_right, unsigned int inner_border_top, unsigned int stride_x, unsigned int stride_y)
+ unsigned int stride_x, unsigned int stride_y)
{
ARM_COMPUTE_ERROR_ON(in_width < 1 || in_height < 1);
- ARM_COMPUTE_ERROR_ON(((in_width - 1) * stride_x + kernel_width + inner_border_right) < 2 * padx);
- ARM_COMPUTE_ERROR_ON(((in_height - 1) * stride_y + kernel_height + inner_border_top) < 2 * pady);
- const int padx_deconv = (kernel_width - padx - 1);
- const int pady_deconv = (kernel_height - pady - 1);
- ARM_COMPUTE_ERROR_ON(padx_deconv < 0);
- ARM_COMPUTE_ERROR_ON(pady_deconv < 0);
- const int w = stride_x * (in_width - 1) + kernel_width + inner_border_right - 2 * padx_deconv;
- const int h = stride_y * (in_height - 1) + kernel_height + inner_border_top - 2 * pady_deconv;
+ ARM_COMPUTE_ERROR_ON(((in_width - 1) * stride_x + kernel_width) < 2 * padx);
+ ARM_COMPUTE_ERROR_ON(((in_height - 1) * stride_y + kernel_height) < 2 * pady);
+ const int w = stride_x * (in_width - 1) + kernel_width - 2 * padx;
+ const int h = stride_y * (in_height - 1) + kernel_height - 2 * pady;
+
return std::make_pair<unsigned int, unsigned int>(w, h);
}