diff options
author | Mike Kelly <mike.kelly@arm.com> | 2019-07-12 16:39:33 +0100 |
---|---|---|
committer | Mike Kelly <mike.kelly@arm.com> | 2019-07-12 16:39:33 +0100 |
commit | 86b36d455a41cfcf9b4938c67df143244a34b2f6 (patch) | |
tree | cb6c2f3ca57a1b4fe19ea23c14e7a9ced471b591 /ConversionUtils.hpp | |
parent | 5e9521ce5eac717b25844f9da4849b1fc2082f76 (diff) | |
download | android-nn-driver-86b36d455a41cfcf9b4938c67df143244a34b2f6.tar.gz |
IVGCVSW-3454 Fix VTS convolution test failures where output shape is incorrect
* Changed calculation when calculating implicit padding to take dilation into account.
* Added CalcPadding function that takes dilation as a parameter.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I38981d9b2cfe8ef36cd0a14d090b541111e7bf34
Diffstat (limited to 'ConversionUtils.hpp')
-rw-r--r-- | ConversionUtils.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index c9be0003..c59da1d5 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -300,6 +300,20 @@ void CalcPadding(uint32_t input, uint32_t kernel, uint32_t stride, uint32_t& out outPadTail = boost::numeric_cast<uint32_t>(padTail); } +#ifdef ARMNN_ANDROID_NN_V1_2 + +void CalcPadding(uint32_t input, uint32_t kernel, uint32_t stride, uint32_t dilation, uint32_t& outPadHead, + uint32_t& outPadTail, android::nn::PaddingScheme scheme) +{ + int32_t padHead; + int32_t padTail; + calculateExplicitPadding(input, stride, dilation, kernel, scheme, &padHead, &padTail); + outPadHead = boost::numeric_cast<uint32_t>(padHead); + outPadTail = boost::numeric_cast<uint32_t>(padTail); +} + +#endif + Shape GetOperandShape(const V1_0::Operand& operand) { Shape shape; |