diff options
author | FinnWilliamsArm <Finn.Williams@arm.com> | 2019-07-16 12:15:18 +0100 |
---|---|---|
committer | Áron Virginás-Tar <aron.virginas-tar@arm.com> | 2019-07-16 14:05:32 +0000 |
commit | 92ec725cb80f6c04f4bc952422fe285f3f42d559 (patch) | |
tree | 76c3a9c412ecdd8b673616a87dfaa99b41b47c51 | |
parent | be5d356c1663009c69c934fd860db1f91863e3d1 (diff) | |
download | android-nn-driver-92ec725cb80f6c04f4bc952422fe285f3f42d559.tar.gz |
IVGCVSW-3498 Fix Vts 1.2 fully_connected dynamic output tests
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com>
Change-Id: Id28e4bd1d55f02c5011f8a364d4b715d1a9190db
-rw-r--r-- | 1.0/HalPolicy.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp index b87727c6..8c617001 100644 --- a/1.0/HalPolicy.cpp +++ b/1.0/HalPolicy.cpp @@ -475,7 +475,13 @@ bool HalPolicy::ConvertFullyConnected(const Operation& operation, const Model& m } const armnn::TensorInfo& inputInfo = input.GetTensorInfo(); - const armnn::TensorInfo& outputInfo = GetTensorInfoForOperand(*output); + armnn::TensorInfo outputInfo = GetTensorInfoForOperand(*output); + + if (IsDynamicOutput(outputInfo)) + { + ALOGD("Output shape not set, will infer from inputs"); + outputInfo.SetShape(inputInfo.GetShape()); + } // ArmNN does not currently support non-fixed weights or bias ConstTensorPin weightsPin = @@ -549,7 +555,12 @@ bool HalPolicy::ConvertFullyConnected(const Operation& operation, const Model& m input.Connect(startLayer->GetInputSlot(0)); } - return SetupAndTrackLayerOutputSlot<hal_1_0::HalPolicy>(operation, 0, *endLayer, model, data); + return SetupAndTrackLayerOutputSlot<hal_1_0::HalPolicy>(operation, + 0, + *endLayer, + model, + data, + armnn::Optional<armnn::TensorInfo>(outputInfo)); } else { |