diff options
author | FinnWilliamsArm <Finn.Williams@Arm.com> | 2020-01-08 14:57:47 +0000 |
---|---|---|
committer | Teresa Charlin <teresa.charlinreyes@arm.com> | 2020-01-15 14:58:23 +0000 |
commit | 42defa6c2bc2574f39963554937bdf81e49be449 (patch) | |
tree | 1240c2b1fb3dff143db0997562dc987f834ed03b /1.0/FullyConnected.hpp | |
parent | 2c90f75496d2c0210a43f35ddb75f6492dd06490 (diff) | |
download | android-nn-driver-branches/android-nn-driver_19_11.tar.gz |
IVGCVSW-4315 Fix Fully Connected infer output shape bugv19.11.1branches/android-nn-driver_19_11
Change-Id: If4fd1abdedf7de2046435d418fb1ee95ceb73419
Signed-off-by: FinnWilliamsArm <Finn.Williams@Arm.com>
Diffstat (limited to '1.0/FullyConnected.hpp')
-rw-r--r-- | 1.0/FullyConnected.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/1.0/FullyConnected.hpp b/1.0/FullyConnected.hpp index 26d61e4c..56997ad2 100644 --- a/1.0/FullyConnected.hpp +++ b/1.0/FullyConnected.hpp @@ -12,8 +12,8 @@ namespace armnn_driver { -inline armnn::TensorShape FlattenFullyConnectedInput(const armnn::TensorShape &inputShape, - const armnn::TensorShape &weightsShape) +inline armnn::TensorShape FlattenFullyConnectedInput(const armnn::TensorShape& inputShape, + const armnn::TensorShape& weightsShape) { if (inputShape.GetNumDimensions() > 2U) { @@ -35,4 +35,13 @@ inline armnn::TensorShape FlattenFullyConnectedInput(const armnn::TensorShape &i } } +inline bool VerifyFullyConnectedShapes(const armnn::TensorShape& inputShape, + const armnn::TensorShape& weightsShape, + const armnn::TensorShape& outputShape, + bool transposeWeightMatrix) +{ + unsigned int dimIdx = transposeWeightMatrix ? 0 : 1; + return (inputShape[0] == outputShape[0] && weightsShape[dimIdx] == outputShape[1]); +} + }
\ No newline at end of file |