diff options
author | FinnWilliamsArm <Finn.Williams@Arm.com> | 2020-01-08 14:57:47 +0000 |
---|---|---|
committer | FinnWilliamsArm <Finn.Williams@Arm.com> | 2020-01-09 12:14:38 +0000 |
commit | 7b8d2e65c129263e9cdbdc82e5f73dd4d263aafb (patch) | |
tree | 7aafd35f2d7436c5de3d6db8da94d2ae48c8d67b /ConversionUtils.hpp | |
parent | 7100649a0f9cdec8195cb26937280080b8c340ce (diff) | |
download | android-nn-driver-7b8d2e65c129263e9cdbdc82e5f73dd4d263aafb.tar.gz |
IVGCVSW-4315 Fix Fully Connected infer output shape bug
Change-Id: If4fd1abdedf7de2046435d418fb1ee95ceb73419
Signed-off-by: FinnWilliamsArm <Finn.Williams@Arm.com>
Diffstat (limited to 'ConversionUtils.hpp')
-rw-r--r-- | ConversionUtils.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index 9500ba68..b53432ca 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -2587,6 +2587,14 @@ bool ConvertFullyConnected(const HalOperation& operation, const HalModel& model, desc.m_TransposeWeightMatrix = true; desc.m_BiasEnabled = true; + if (!VerifyFullyConnectedShapes(reshapedInfo.GetShape(), + weights.GetInfo().GetShape(), + outputInfo.GetShape(), + desc.m_TransposeWeightMatrix)) + { + return Fail("%s: Expected outputShape does not match actual outputShape", __func__); + } + bool isSupported = false; FORWARD_LAYER_SUPPORT_FUNC(__func__, IsFullyConnectedSupported, |