From 20e8916bee2a9ddb84ee61daf56fefd9c624cfbc Mon Sep 17 00:00:00 2001 From: FinnWilliamsArm Date: Wed, 8 Jan 2020 14:57:47 +0000 Subject: IVGCVSW-4315 Fix Fully Connected infer output shape bug Change-Id: If4fd1abdedf7de2046435d418fb1ee95ceb73419 Signed-off-by: FinnWilliamsArm --- ConversionUtils.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ConversionUtils.hpp') diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index afaf1af7..acf215d5 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -2336,6 +2336,14 @@ bool ConvertFullyConnected(const Operation& operation, const Model& model, Conve 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, -- cgit v1.2.1