diff options
author | Matthew Jackson <matthew.jackson@arm.com> | 2019-08-22 16:13:27 +0100 |
---|---|---|
committer | Matthew Jackson <matthew.jackson@arm.com> | 2019-08-28 09:22:18 +0000 |
commit | b9070a42a44ec1a0102e2f0b04523d2e96392903 (patch) | |
tree | 476ae6897e26380a00e4ccfdcd315d6b6f884622 /src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp | |
parent | 275f99cb09606191c5589952d57175be655de74a (diff) | |
download | ComputeLibrary-b9070a42a44ec1a0102e2f0b04523d2e96392903.tar.gz |
COMPMID-2605: Add asymmetric padding support for Deconvolution layer
Change-Id: I63b773bdce25f1342ccd3a08ded623a1508f70fe
Signed-off-by: Matthew Jackson <matthew.jackson@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1797
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp b/src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp index 50f654680c..4ae9cabd1f 100644 --- a/src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp +++ b/src/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.cpp @@ -56,7 +56,6 @@ Status CLDeconvolutionLayerUpsampleKernel::validate(const ITensorInfo *input, co ARM_COMPUTE_RETURN_ERROR_ON(output->dimension(idx_w) == 0); ARM_COMPUTE_RETURN_ERROR_ON(output->dimension(idx_h) == 0); - ARM_COMPUTE_RETURN_ERROR_ON(!info.padding_is_symmetric()); ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(idx_c) != output->dimension(idx_c)); for(size_t i = 3; i < Coordinates::num_max_dimensions; ++i) @@ -104,12 +103,12 @@ void CLDeconvolutionLayerUpsampleKernel::run(const Window &window, cl::CommandQu const size_t idx_w = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH); const size_t idx_h = get_data_layout_dimension_index(data_layout, DataLayoutDimension::HEIGHT); - const int out_start_x = _info.pad().first; - const int out_end_x = _output->info()->dimension(idx_w) - _info.pad().first + _info.stride().first - 1; + const int out_start_x = _info.pad_left(); + const int out_end_x = _output->info()->dimension(idx_w) - _info.pad_right() + _info.stride().first - 1; const int out_step_x = _info.stride().first; - const int out_start_y = _info.pad().second; - const int out_end_y = _output->info()->dimension(idx_h) - _info.pad().second + _info.stride().second - 1; + const int out_start_y = _info.pad_top(); + const int out_end_y = _output->info()->dimension(idx_h) - _info.pad_bottom() + _info.stride().second - 1; const int out_step_y = _info.stride().second; switch(data_layout) |