From fa0add17fd08f623359fa19abfbcc681bbd8f220 Mon Sep 17 00:00:00 2001 From: Diego Lopez Recas Date: Tue, 28 Nov 2017 16:44:52 +0000 Subject: Fix border handler for CLDepthwiseConvolution3x3 Change-Id: Ibf855a8ff86750978ecb81441369c83bc766f143 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110987 Reviewed-by: Anthony Barbier Reviewed-by: Georgios Pinitas Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com --- src/runtime/CL/functions/CLDepthwiseConvolution.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/runtime/CL/functions/CLDepthwiseConvolution.cpp b/src/runtime/CL/functions/CLDepthwiseConvolution.cpp index baa05b921a..a701391c44 100644 --- a/src/runtime/CL/functions/CLDepthwiseConvolution.cpp +++ b/src/runtime/CL/functions/CLDepthwiseConvolution.cpp @@ -43,7 +43,14 @@ void CLDepthwiseConvolution3x3::configure(ICLTensor *input, const ICLTensor *wei _kernel.set_target(CLScheduler::get().target()); _kernel.configure(input, weights, biases, output, conv_info); - _border_handler.configure(input, _kernel.border_size(), BorderMode::CONSTANT, PixelValue(0)); + + // Configure border handler + PixelValue &&zero_value(0.f); + if(is_data_type_quantized_asymmetric(input->info()->data_type())) + { + zero_value = PixelValue(static_cast(input->info()->quantization_info().offset)); + } + _border_handler.configure(input, _kernel.border_size(), BorderMode::CONSTANT, zero_value); } void CLDepthwiseConvolution3x3::run() -- cgit v1.2.1