aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2023-06-30 15:18:26 +0100
committermike.kelly <mike.kelly@arm.com>2023-07-03 15:32:04 +0000
commita9ac6ba643e8dc4fee88bd0e7e186f0918080c4b (patch)
tree4e05fbb098b30f3d2c7d3e5b4b83d48c9bdd59ac /src/armnn/layers
parent6d2d4ead359aa02d502f15cfcb7e69c7658bd1ed (diff)
downloadarmnn-a9ac6ba643e8dc4fee88bd0e7e186f0918080c4b.tar.gz
IVGCVSW-7828 Add an Optional TensorInfo to InputSlot
* Updated calls to use the new function From: GetInputSlot(n).GetConnection()->GetTensorInfo(); To: GetInputSlot(n).GetTensorInfo(); * Added UnitTests Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I43184cc05e4472011b9347aaa820eb8deb1cd4a0
Diffstat (limited to 'src/armnn/layers')
-rw-r--r--src/armnn/layers/AbsLayer.cpp4
-rw-r--r--src/armnn/layers/ActivationLayer.cpp4
-rw-r--r--src/armnn/layers/ArgMinMaxLayer.cpp4
-rw-r--r--src/armnn/layers/BatchMatMulLayer.cpp6
-rw-r--r--src/armnn/layers/BatchNormalizationLayer.cpp4
-rw-r--r--src/armnn/layers/BatchToSpaceNdLayer.cpp4
-rw-r--r--src/armnn/layers/CastLayer.cpp4
-rw-r--r--src/armnn/layers/ChannelShuffleLayer.cpp4
-rw-r--r--src/armnn/layers/ComparisonLayer.cpp4
-rw-r--r--src/armnn/layers/ConcatLayer.cpp11
-rw-r--r--src/armnn/layers/ConstantLayer.cpp2
-rw-r--r--src/armnn/layers/ConvertFp16ToFp32Layer.cpp4
-rw-r--r--src/armnn/layers/ConvertFp32ToFp16Layer.cpp4
-rw-r--r--src/armnn/layers/Convolution2dLayer.cpp10
-rw-r--r--src/armnn/layers/Convolution3dLayer.cpp10
-rw-r--r--src/armnn/layers/DebugLayer.cpp4
-rw-r--r--src/armnn/layers/DepthToSpaceLayer.cpp4
-rw-r--r--src/armnn/layers/DepthwiseConvolution2dLayer.cpp10
-rw-r--r--src/armnn/layers/DequantizeLayer.cpp4
-rw-r--r--src/armnn/layers/DetectionPostProcessLayer.cpp4
-rw-r--r--src/armnn/layers/ElementwiseBaseLayer.cpp4
-rw-r--r--src/armnn/layers/ElementwiseBinaryLayer.cpp4
-rw-r--r--src/armnn/layers/ElementwiseUnaryLayer.cpp4
-rw-r--r--src/armnn/layers/FakeQuantizationLayer.cpp4
-rw-r--r--src/armnn/layers/FillLayer.cpp4
-rw-r--r--src/armnn/layers/FloorLayer.cpp4
-rw-r--r--src/armnn/layers/FullyConnectedLayer.cpp6
-rw-r--r--src/armnn/layers/GatherLayer.cpp6
-rw-r--r--src/armnn/layers/GatherNdLayer.cpp6
-rw-r--r--src/armnn/layers/InstanceNormalizationLayer.cpp4
-rw-r--r--src/armnn/layers/L2NormalizationLayer.cpp4
-rw-r--r--src/armnn/layers/LayerWithParameters.hpp2
-rw-r--r--src/armnn/layers/LogSoftmaxLayer.cpp4
-rw-r--r--src/armnn/layers/LogicalBinaryLayer.cpp6
-rw-r--r--src/armnn/layers/LstmLayer.cpp8
-rw-r--r--src/armnn/layers/MeanLayer.cpp2
-rw-r--r--src/armnn/layers/MemCopyLayer.cpp4
-rw-r--r--src/armnn/layers/MemImportLayer.cpp4
-rw-r--r--src/armnn/layers/MergeLayer.cpp6
-rw-r--r--src/armnn/layers/NormalizationLayer.cpp4
-rw-r--r--src/armnn/layers/PadLayer.cpp4
-rw-r--r--src/armnn/layers/PermuteLayer.cpp4
-rw-r--r--src/armnn/layers/Pooling2dLayer.cpp4
-rw-r--r--src/armnn/layers/Pooling3dLayer.cpp4
-rw-r--r--src/armnn/layers/PreluLayer.cpp6
-rw-r--r--src/armnn/layers/QLstmLayer.cpp8
-rw-r--r--src/armnn/layers/QuantizeLayer.cpp4
-rw-r--r--src/armnn/layers/QuantizedLstmLayer.cpp8
-rw-r--r--src/armnn/layers/ReduceLayer.cpp2
-rw-r--r--src/armnn/layers/ReshapeLayer.cpp2
-rw-r--r--src/armnn/layers/ResizeLayer.cpp4
-rw-r--r--src/armnn/layers/RsqrtLayer.cpp4
-rw-r--r--src/armnn/layers/ShapeLayer.cpp4
-rw-r--r--src/armnn/layers/SliceLayer.cpp4
-rw-r--r--src/armnn/layers/SoftmaxLayer.cpp4
-rw-r--r--src/armnn/layers/SpaceToBatchNdLayer.cpp4
-rw-r--r--src/armnn/layers/SpaceToDepthLayer.cpp4
-rw-r--r--src/armnn/layers/SplitterLayer.cpp6
-rw-r--r--src/armnn/layers/StackLayer.cpp4
-rw-r--r--src/armnn/layers/StridedSliceLayer.cpp4
-rw-r--r--src/armnn/layers/SwitchLayer.cpp6
-rw-r--r--src/armnn/layers/TransposeConvolution2dLayer.cpp4
-rw-r--r--src/armnn/layers/TransposeLayer.cpp4
-rw-r--r--src/armnn/layers/UnidirectionalSequenceLstmLayer.cpp8
64 files changed, 154 insertions, 151 deletions
diff --git a/src/armnn/layers/AbsLayer.cpp b/src/armnn/layers/AbsLayer.cpp
index 072d13ce93..6858b364a6 100644
--- a/src/armnn/layers/AbsLayer.cpp
+++ b/src/armnn/layers/AbsLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -40,7 +40,7 @@ void AbsLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ActivationLayer.cpp b/src/armnn/layers/ActivationLayer.cpp
index eea18d71e4..fe4aaa766f 100644
--- a/src/armnn/layers/ActivationLayer.cpp
+++ b/src/armnn/layers/ActivationLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "ActivationLayer.hpp"
@@ -38,7 +38,7 @@ void ActivationLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ArgMinMaxLayer.cpp b/src/armnn/layers/ArgMinMaxLayer.cpp
index 57a6ff12d8..37986572a0 100644
--- a/src/armnn/layers/ArgMinMaxLayer.cpp
+++ b/src/armnn/layers/ArgMinMaxLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -79,7 +79,7 @@ void ArgMinMaxLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/BatchMatMulLayer.cpp b/src/armnn/layers/BatchMatMulLayer.cpp
index 0f86b9dc48..8b2629c4ea 100644
--- a/src/armnn/layers/BatchMatMulLayer.cpp
+++ b/src/armnn/layers/BatchMatMulLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "BatchMatMulLayer.hpp"
@@ -99,8 +99,8 @@ void BatchMatMulLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
auto inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/BatchNormalizationLayer.cpp b/src/armnn/layers/BatchNormalizationLayer.cpp
index b5e9f2c413..17463f8d4f 100644
--- a/src/armnn/layers/BatchNormalizationLayer.cpp
+++ b/src/armnn/layers/BatchNormalizationLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "BatchNormalizationLayer.hpp"
@@ -57,7 +57,7 @@ void BatchNormalizationLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/BatchToSpaceNdLayer.cpp b/src/armnn/layers/BatchToSpaceNdLayer.cpp
index b760b5661c..63817dde16 100644
--- a/src/armnn/layers/BatchToSpaceNdLayer.cpp
+++ b/src/armnn/layers/BatchToSpaceNdLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2018-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -43,7 +43,7 @@ void BatchToSpaceNdLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape()});
+ auto inferredShapes = InferOutputShapes({GetInputSlot(0).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/CastLayer.cpp b/src/armnn/layers/CastLayer.cpp
index efa74c82c3..fc1ab81d4f 100644
--- a/src/armnn/layers/CastLayer.cpp
+++ b/src/armnn/layers/CastLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "CastLayer.hpp"
@@ -39,7 +39,7 @@ void CastLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ChannelShuffleLayer.cpp b/src/armnn/layers/ChannelShuffleLayer.cpp
index 33ea70e94a..ce6c0bac11 100644
--- a/src/armnn/layers/ChannelShuffleLayer.cpp
+++ b/src/armnn/layers/ChannelShuffleLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -40,7 +40,7 @@ void ChannelShuffleLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = Layer::InferOutputShapes({GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = Layer::InferOutputShapes({GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ComparisonLayer.cpp b/src/armnn/layers/ComparisonLayer.cpp
index c097cddf4d..5d18a58f3c 100644
--- a/src/armnn/layers/ComparisonLayer.cpp
+++ b/src/armnn/layers/ComparisonLayer.cpp
@@ -79,8 +79,8 @@ void ComparisonLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()
});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ConcatLayer.cpp b/src/armnn/layers/ConcatLayer.cpp
index 69660dd04f..7a1b689b2c 100644
--- a/src/armnn/layers/ConcatLayer.cpp
+++ b/src/armnn/layers/ConcatLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "ConcatLayer.hpp"
@@ -104,14 +104,13 @@ void ConcatLayer::CreateTensors(const TensorHandleFactoryRegistry& registry,
}
}
}
-
// First go through all the input slots and verify that we can sub-tensor all the inputs.
std::vector<std::unique_ptr<ITensorHandle>> subTensors(0);
subTensors.reserve(numInputSlots);
for (unsigned int i = 0; i < numInputSlots; ++i)
{
OutputSlot* slot = currentLayer->GetInputSlot(i).GetConnectedOutputSlot();
- const TensorInfo& info = slot->GetTensorInfo();
+ const TensorInfo& info = currentLayer->GetInputSlot(i).GetTensorInfo();
auto CreateSubTensor = [&]()
{
@@ -121,13 +120,15 @@ void ConcatLayer::CreateTensors(const TensorHandleFactoryRegistry& registry,
// 3) the input does not come from a Constant layer or input layer
// 4) the input is only read by this concat layer
// 5) if concat along x or y (2 innermost dimensions) and the previous layers do not require padding
+ // 6) the input does not have an Overridden TensorInfo
if (slot &&
parentInfo.IsTypeSpaceMatch(info) && //(1)
factoryId == slot->GetTensorHandleFactoryId() && //(2)
slot->GetOwningLayer().GetType() != LayerType::Constant && //(3)
slot->GetOwningLayer().GetType() != LayerType::Input && //(3)
slot->GetNumConnections() == 1 &&
- canUseSubTensorOnXorY) //(5)
+ canUseSubTensorOnXorY && //(5)
+ !currentLayer->GetInputSlot(i).IsTensorInfoOverridden()) //(6)
{
ARMNN_NO_DEPRECATE_WARN_BEGIN
return factory.CreateSubTensorHandle(*parentTensor,
@@ -308,7 +309,7 @@ void ConcatLayer::ValidateTensorShapesFromInputs()
std::vector<TensorShape> inputShapes;
for (unsigned int i = 0; i < GetNumInputSlots(); ++i)
{
- inputShapes.push_back(GetInputSlot(i).GetConnection()->GetTensorInfo().GetShape());
+ inputShapes.push_back(GetInputSlot(i).GetTensorInfo().GetShape());
}
auto inferredShapes = InferOutputShapes(inputShapes);
diff --git a/src/armnn/layers/ConstantLayer.cpp b/src/armnn/layers/ConstantLayer.cpp
index a17bb4fc93..a472c25790 100644
--- a/src/armnn/layers/ConstantLayer.cpp
+++ b/src/armnn/layers/ConstantLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "ConstantLayer.hpp"
diff --git a/src/armnn/layers/ConvertFp16ToFp32Layer.cpp b/src/armnn/layers/ConvertFp16ToFp32Layer.cpp
index e3865a6dcb..9fefe2016a 100644
--- a/src/armnn/layers/ConvertFp16ToFp32Layer.cpp
+++ b/src/armnn/layers/ConvertFp16ToFp32Layer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -40,7 +40,7 @@ void ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ConvertFp32ToFp16Layer.cpp b/src/armnn/layers/ConvertFp32ToFp16Layer.cpp
index 36708c56e0..f1abba32c6 100644
--- a/src/armnn/layers/ConvertFp32ToFp16Layer.cpp
+++ b/src/armnn/layers/ConvertFp32ToFp16Layer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "ConvertFp32ToFp16Layer.hpp"
@@ -40,7 +40,7 @@ void ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/Convolution2dLayer.cpp b/src/armnn/layers/Convolution2dLayer.cpp
index f6a5583aad..df971a517d 100644
--- a/src/armnn/layers/Convolution2dLayer.cpp
+++ b/src/armnn/layers/Convolution2dLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -31,8 +31,8 @@ void Convolution2dLayer::SerializeLayerParameters(ParameterStringifyFunction& fn
//using DescriptorType = Parameters;
const std::vector<TensorShape>& inputShapes =
{
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()
};
const TensorShape filterShape = inputShapes[1];
DataLayoutIndexed dataLayoutIndex(m_Param.m_DataLayout);
@@ -111,8 +111,8 @@ void Convolution2dLayer::ValidateTensorShapesFromInputs()
"Convolution2dLayer: Weights should be connected to input slot 1.");
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/Convolution3dLayer.cpp b/src/armnn/layers/Convolution3dLayer.cpp
index b01870af46..2d697beb1f 100644
--- a/src/armnn/layers/Convolution3dLayer.cpp
+++ b/src/armnn/layers/Convolution3dLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -24,8 +24,8 @@ void Convolution3dLayer::SerializeLayerParameters(ParameterStringifyFunction& fn
{
const std::vector<TensorShape>& inputShapes =
{
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape(),
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape(),
};
// Conv3d Filter Layout: [D,H,W,I,O]
@@ -116,8 +116,8 @@ void Convolution3dLayer::ValidateTensorShapesFromInputs()
"Convolution3dLayer: Weights should be connected to input slot 1.");
auto inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/DebugLayer.cpp b/src/armnn/layers/DebugLayer.cpp
index e1c8572c95..01c1c7be6b 100644
--- a/src/armnn/layers/DebugLayer.cpp
+++ b/src/armnn/layers/DebugLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "DebugLayer.hpp"
@@ -51,7 +51,7 @@ void DebugLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/DepthToSpaceLayer.cpp b/src/armnn/layers/DepthToSpaceLayer.cpp
index 2414b00e2f..b94eccc1ee 100644
--- a/src/armnn/layers/DepthToSpaceLayer.cpp
+++ b/src/armnn/layers/DepthToSpaceLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -68,7 +68,7 @@ void DepthToSpaceLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/DepthwiseConvolution2dLayer.cpp b/src/armnn/layers/DepthwiseConvolution2dLayer.cpp
index 1e5a998119..4f08b2324e 100644
--- a/src/armnn/layers/DepthwiseConvolution2dLayer.cpp
+++ b/src/armnn/layers/DepthwiseConvolution2dLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -30,8 +30,8 @@ void DepthwiseConvolution2dLayer::SerializeLayerParameters(ParameterStringifyFun
{
const std::vector<TensorShape>& inputShapes =
{
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()
};
const TensorShape filterShape = inputShapes[1];
unsigned int inputChannels = filterShape[1];
@@ -114,8 +114,8 @@ void DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs()
"DepthwiseConvolution2dLayer: Weights data should not be null.");
auto inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()
});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/DequantizeLayer.cpp b/src/armnn/layers/DequantizeLayer.cpp
index 7bc03f4cde..b398cf6e0d 100644
--- a/src/armnn/layers/DequantizeLayer.cpp
+++ b/src/armnn/layers/DequantizeLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "DequantizeLayer.hpp"
@@ -39,7 +39,7 @@ void DequantizeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/DetectionPostProcessLayer.cpp b/src/armnn/layers/DetectionPostProcessLayer.cpp
index 27e459b0ce..6bddf51551 100644
--- a/src/armnn/layers/DetectionPostProcessLayer.cpp
+++ b/src/armnn/layers/DetectionPostProcessLayer.cpp
@@ -50,8 +50,8 @@ void DetectionPostProcessLayer::ValidateTensorShapesFromInputs()
ARMNN_ASSERT_MSG(GetNumOutputSlots() == 4, "DetectionPostProcessLayer: The layer should return 4 outputs.");
std::vector<TensorShape> inferredShapes = InferOutputShapes(
- { GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() });
+ { GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 4);
ARMNN_ASSERT(inferredShapes[0].GetDimensionality() == Dimensionality::Specified);
diff --git a/src/armnn/layers/ElementwiseBaseLayer.cpp b/src/armnn/layers/ElementwiseBaseLayer.cpp
index 87fddfea79..3cbddfa5db 100644
--- a/src/armnn/layers/ElementwiseBaseLayer.cpp
+++ b/src/armnn/layers/ElementwiseBaseLayer.cpp
@@ -66,8 +66,8 @@ void ElementwiseBaseLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ElementwiseBinaryLayer.cpp b/src/armnn/layers/ElementwiseBinaryLayer.cpp
index ae1813f33a..67619fc463 100644
--- a/src/armnn/layers/ElementwiseBinaryLayer.cpp
+++ b/src/armnn/layers/ElementwiseBinaryLayer.cpp
@@ -74,8 +74,8 @@ void ElementwiseBinaryLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ElementwiseUnaryLayer.cpp b/src/armnn/layers/ElementwiseUnaryLayer.cpp
index a6c1f16ed3..c648f9b863 100644
--- a/src/armnn/layers/ElementwiseUnaryLayer.cpp
+++ b/src/armnn/layers/ElementwiseUnaryLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -49,7 +49,7 @@ void ElementwiseUnaryLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape()});
+ GetInputSlot(0).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 1);
ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, GetLayerTypeAsCString(GetType()));
diff --git a/src/armnn/layers/FakeQuantizationLayer.cpp b/src/armnn/layers/FakeQuantizationLayer.cpp
index 5c6ac18cf7..a612b5a4ec 100644
--- a/src/armnn/layers/FakeQuantizationLayer.cpp
+++ b/src/armnn/layers/FakeQuantizationLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FakeQuantizationLayer.hpp"
@@ -39,7 +39,7 @@ void FakeQuantizationLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/FillLayer.cpp b/src/armnn/layers/FillLayer.cpp
index 0822c3c83e..af01b99847 100644
--- a/src/armnn/layers/FillLayer.cpp
+++ b/src/armnn/layers/FillLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FillLayer.hpp"
@@ -39,7 +39,7 @@ void FillLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/FloorLayer.cpp b/src/armnn/layers/FloorLayer.cpp
index 471b575eb0..2db8d91b4b 100644
--- a/src/armnn/layers/FloorLayer.cpp
+++ b/src/armnn/layers/FloorLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FloorLayer.hpp"
@@ -39,7 +39,7 @@ void FloorLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "FloorLayer");
diff --git a/src/armnn/layers/FullyConnectedLayer.cpp b/src/armnn/layers/FullyConnectedLayer.cpp
index f86f58443f..87a8adacaa 100644
--- a/src/armnn/layers/FullyConnectedLayer.cpp
+++ b/src/armnn/layers/FullyConnectedLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FullyConnectedLayer.hpp"
@@ -52,8 +52,8 @@ void FullyConnectedLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes(
- {GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()});
+ {GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 1);
ARMNN_ASSERT(inferredShapes[0].GetDimensionality() == Dimensionality::Specified);
diff --git a/src/armnn/layers/GatherLayer.cpp b/src/armnn/layers/GatherLayer.cpp
index 252dfd2f45..ae5ecd6cb6 100644
--- a/src/armnn/layers/GatherLayer.cpp
+++ b/src/armnn/layers/GatherLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -80,8 +80,8 @@ void GatherLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes(
- {GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()});
+ {GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 1);
ARMNN_ASSERT(inferredShapes[0].GetDimensionality() == Dimensionality::Specified ||
inferredShapes[0].GetDimensionality() == Dimensionality::Scalar);
diff --git a/src/armnn/layers/GatherNdLayer.cpp b/src/armnn/layers/GatherNdLayer.cpp
index 036b3cfa86..0f06946634 100644
--- a/src/armnn/layers/GatherNdLayer.cpp
+++ b/src/armnn/layers/GatherNdLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -84,8 +84,8 @@ void GatherNdLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes(
- {GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()});
+ {GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 1);
ARMNN_ASSERT(inferredShapes[0].GetDimensionality() == Dimensionality::Specified ||
inferredShapes[0].GetDimensionality() == Dimensionality::Scalar);
diff --git a/src/armnn/layers/InstanceNormalizationLayer.cpp b/src/armnn/layers/InstanceNormalizationLayer.cpp
index 10543c6aa1..db6cd206cc 100644
--- a/src/armnn/layers/InstanceNormalizationLayer.cpp
+++ b/src/armnn/layers/InstanceNormalizationLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "InstanceNormalizationLayer.hpp"
@@ -39,7 +39,7 @@ void InstanceNormalizationLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/L2NormalizationLayer.cpp b/src/armnn/layers/L2NormalizationLayer.cpp
index 8ea242be61..2d268dddef 100644
--- a/src/armnn/layers/L2NormalizationLayer.cpp
+++ b/src/armnn/layers/L2NormalizationLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "L2NormalizationLayer.hpp"
@@ -39,7 +39,7 @@ void L2NormalizationLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/LayerWithParameters.hpp b/src/armnn/layers/LayerWithParameters.hpp
index 0a1dbf363c..4e7cd45125 100644
--- a/src/armnn/layers/LayerWithParameters.hpp
+++ b/src/armnn/layers/LayerWithParameters.hpp
@@ -61,7 +61,7 @@ protected:
Layer::ImmutableConstantTensors tensors;
for (unsigned int i = 0; i < GetNumInputSlots(); ++i)
{
- if (GetInputSlot(i).GetConnection() && GetInputSlot(i).GetConnection()->GetTensorInfo().IsConstant())
+ if (GetInputSlot(i).GetConnection() && GetInputSlot(i).GetTensorInfo().IsConstant())
{
auto &inputLayer = GetInputSlot(i).GetConnectedOutputSlot()->GetOwningLayer();
if (inputLayer.GetType() == armnn::LayerType::Constant)
diff --git a/src/armnn/layers/LogSoftmaxLayer.cpp b/src/armnn/layers/LogSoftmaxLayer.cpp
index 0698b70638..872d42297f 100644
--- a/src/armnn/layers/LogSoftmaxLayer.cpp
+++ b/src/armnn/layers/LogSoftmaxLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -39,7 +39,7 @@ void LogSoftmaxLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "LogSoftmaxLayer");
diff --git a/src/armnn/layers/LogicalBinaryLayer.cpp b/src/armnn/layers/LogicalBinaryLayer.cpp
index 736a0c27ce..84a6e8e812 100644
--- a/src/armnn/layers/LogicalBinaryLayer.cpp
+++ b/src/armnn/layers/LogicalBinaryLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -64,8 +64,8 @@ void LogicalBinaryLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()
});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/LstmLayer.cpp b/src/armnn/layers/LstmLayer.cpp
index 2c9604396b..0e6f3d882b 100644
--- a/src/armnn/layers/LstmLayer.cpp
+++ b/src/armnn/layers/LstmLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "LstmLayer.hpp"
@@ -174,9 +174,9 @@ void LstmLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
auto inferredShapes = InferOutputShapes( {
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(2).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape(),
+ GetInputSlot(2).GetTensorInfo().GetShape()
});
ARMNN_ASSERT(inferredShapes.size() == 4);
diff --git a/src/armnn/layers/MeanLayer.cpp b/src/armnn/layers/MeanLayer.cpp
index a6f721b076..bd49f509a0 100644
--- a/src/armnn/layers/MeanLayer.cpp
+++ b/src/armnn/layers/MeanLayer.cpp
@@ -50,7 +50,7 @@ void MeanLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes(
- { GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ { GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
ARMNN_ASSERT(inferredShapes[0].GetDimensionality() == Dimensionality::Specified);
diff --git a/src/armnn/layers/MemCopyLayer.cpp b/src/armnn/layers/MemCopyLayer.cpp
index 0443c75675..6dd203448d 100644
--- a/src/armnn/layers/MemCopyLayer.cpp
+++ b/src/armnn/layers/MemCopyLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "MemCopyLayer.hpp"
@@ -42,7 +42,7 @@ void MemCopyLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/MemImportLayer.cpp b/src/armnn/layers/MemImportLayer.cpp
index 98b012901f..a1c92f676e 100644
--- a/src/armnn/layers/MemImportLayer.cpp
+++ b/src/armnn/layers/MemImportLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "MemImportLayer.hpp"
@@ -42,7 +42,7 @@ void MemImportLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/MergeLayer.cpp b/src/armnn/layers/MergeLayer.cpp
index 94a0c1033d..a3b098ae00 100644
--- a/src/armnn/layers/MergeLayer.cpp
+++ b/src/armnn/layers/MergeLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "MergeLayer.hpp"
@@ -36,8 +36,8 @@ void MergeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape(),
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape(),
});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/NormalizationLayer.cpp b/src/armnn/layers/NormalizationLayer.cpp
index 372cd7637a..24b6788ee6 100644
--- a/src/armnn/layers/NormalizationLayer.cpp
+++ b/src/armnn/layers/NormalizationLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "NormalizationLayer.hpp"
@@ -39,7 +39,7 @@ void NormalizationLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/PadLayer.cpp b/src/armnn/layers/PadLayer.cpp
index ce63d7be51..0024ba5541 100644
--- a/src/armnn/layers/PadLayer.cpp
+++ b/src/armnn/layers/PadLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -66,7 +66,7 @@ void PadLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/PermuteLayer.cpp b/src/armnn/layers/PermuteLayer.cpp
index 16dc4d6713..f8803a167e 100644
--- a/src/armnn/layers/PermuteLayer.cpp
+++ b/src/armnn/layers/PermuteLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -50,7 +50,7 @@ void PermuteLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/Pooling2dLayer.cpp b/src/armnn/layers/Pooling2dLayer.cpp
index 34deed2a30..e423b8bf38 100644
--- a/src/armnn/layers/Pooling2dLayer.cpp
+++ b/src/armnn/layers/Pooling2dLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -110,7 +110,7 @@ void Pooling2dLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/Pooling3dLayer.cpp b/src/armnn/layers/Pooling3dLayer.cpp
index fe92f62822..ec1ec80f0e 100644
--- a/src/armnn/layers/Pooling3dLayer.cpp
+++ b/src/armnn/layers/Pooling3dLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -114,7 +114,7 @@ void Pooling3dLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/PreluLayer.cpp b/src/armnn/layers/PreluLayer.cpp
index e6ab0d8b75..a302640434 100644
--- a/src/armnn/layers/PreluLayer.cpp
+++ b/src/armnn/layers/PreluLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -107,8 +107,8 @@ void PreluLayer::ValidateTensorShapesFromInputs()
std::vector<TensorShape> inferredShapes = InferOutputShapes(
{
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()
});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/QLstmLayer.cpp b/src/armnn/layers/QLstmLayer.cpp
index bfdbe16155..eeb01db51d 100644
--- a/src/armnn/layers/QLstmLayer.cpp
+++ b/src/armnn/layers/QLstmLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "QLstmLayer.hpp"
@@ -177,9 +177,9 @@ void QLstmLayer::ValidateTensorShapesFromInputs()
auto inferredShapes = InferOutputShapes(
{
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(), // input
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape(), // previousOutputIn
- GetInputSlot(2).GetConnection()->GetTensorInfo().GetShape() // previousCellStateIn
+ GetInputSlot(0).GetTensorInfo().GetShape(), // input
+ GetInputSlot(1).GetTensorInfo().GetShape(), // previousOutputIn
+ GetInputSlot(2).GetTensorInfo().GetShape() // previousCellStateIn
});
ARMNN_ASSERT(inferredShapes.size() == 3);
diff --git a/src/armnn/layers/QuantizeLayer.cpp b/src/armnn/layers/QuantizeLayer.cpp
index 3ad286e64c..03fb208b3e 100644
--- a/src/armnn/layers/QuantizeLayer.cpp
+++ b/src/armnn/layers/QuantizeLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -38,7 +38,7 @@ void QuantizeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "QuantizeLayer");
}
diff --git a/src/armnn/layers/QuantizedLstmLayer.cpp b/src/armnn/layers/QuantizedLstmLayer.cpp
index a213a1b5b0..c82e34f983 100644
--- a/src/armnn/layers/QuantizedLstmLayer.cpp
+++ b/src/armnn/layers/QuantizedLstmLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "QuantizedLstmLayer.hpp"
@@ -103,9 +103,9 @@ void QuantizedLstmLayer::ValidateTensorShapesFromInputs()
auto inferredShapes = InferOutputShapes(
{
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(), // input
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape(), // previousCellStateIn
- GetInputSlot(2).GetConnection()->GetTensorInfo().GetShape() // previousOutputIn
+ GetInputSlot(0).GetTensorInfo().GetShape(), // input
+ GetInputSlot(1).GetTensorInfo().GetShape(), // previousCellStateIn
+ GetInputSlot(2).GetTensorInfo().GetShape() // previousOutputIn
});
ARMNN_ASSERT(inferredShapes.size() == 2);
diff --git a/src/armnn/layers/ReduceLayer.cpp b/src/armnn/layers/ReduceLayer.cpp
index ebee213659..21095dda74 100644
--- a/src/armnn/layers/ReduceLayer.cpp
+++ b/src/armnn/layers/ReduceLayer.cpp
@@ -49,7 +49,7 @@ void ReduceLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- const TensorInfo& input = GetInputSlot(0).GetConnection()->GetTensorInfo();
+ const TensorInfo& input = GetInputSlot(0).GetTensorInfo();
ARMNN_ASSERT_MSG(input.GetNumDimensions() > 0 && input.GetNumDimensions() <= 4,
"ReduceLayer: Reduce supports up to 4D input.");
diff --git a/src/armnn/layers/ReshapeLayer.cpp b/src/armnn/layers/ReshapeLayer.cpp
index e68460bf32..b786f54fe3 100644
--- a/src/armnn/layers/ReshapeLayer.cpp
+++ b/src/armnn/layers/ReshapeLayer.cpp
@@ -46,7 +46,7 @@ void ReshapeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
ARMNN_ASSERT(inferredShapes[0].GetDimensionality() == Dimensionality::Specified);
diff --git a/src/armnn/layers/ResizeLayer.cpp b/src/armnn/layers/ResizeLayer.cpp
index 188d134880..734df0a9a2 100644
--- a/src/armnn/layers/ResizeLayer.cpp
+++ b/src/armnn/layers/ResizeLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -68,7 +68,7 @@ void ResizeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/RsqrtLayer.cpp b/src/armnn/layers/RsqrtLayer.cpp
index 0c2cc6373b..91f6d10a69 100644
--- a/src/armnn/layers/RsqrtLayer.cpp
+++ b/src/armnn/layers/RsqrtLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -41,7 +41,7 @@ void RsqrtLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/ShapeLayer.cpp b/src/armnn/layers/ShapeLayer.cpp
index dbc0d7a888..e7e343c707 100644
--- a/src/armnn/layers/ShapeLayer.cpp
+++ b/src/armnn/layers/ShapeLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -42,7 +42,7 @@ void ShapeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShape = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShape = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShape.size() == 1);
diff --git a/src/armnn/layers/SliceLayer.cpp b/src/armnn/layers/SliceLayer.cpp
index 6362be3de2..a9327c6111 100644
--- a/src/armnn/layers/SliceLayer.cpp
+++ b/src/armnn/layers/SliceLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -42,7 +42,7 @@ void SliceLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/SoftmaxLayer.cpp b/src/armnn/layers/SoftmaxLayer.cpp
index b1cb191511..5f68278454 100644
--- a/src/armnn/layers/SoftmaxLayer.cpp
+++ b/src/armnn/layers/SoftmaxLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "SoftmaxLayer.hpp"
@@ -39,7 +39,7 @@ void SoftmaxLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/SpaceToBatchNdLayer.cpp b/src/armnn/layers/SpaceToBatchNdLayer.cpp
index a758617e2e..277fc4479d 100644
--- a/src/armnn/layers/SpaceToBatchNdLayer.cpp
+++ b/src/armnn/layers/SpaceToBatchNdLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2018-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -69,7 +69,7 @@ void SpaceToBatchNdLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/SpaceToDepthLayer.cpp b/src/armnn/layers/SpaceToDepthLayer.cpp
index f2f0b768a7..c86758f67f 100644
--- a/src/armnn/layers/SpaceToDepthLayer.cpp
+++ b/src/armnn/layers/SpaceToDepthLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -70,7 +70,7 @@ void SpaceToDepthLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/SplitterLayer.cpp b/src/armnn/layers/SplitterLayer.cpp
index 0226a046be..86a42305ff 100644
--- a/src/armnn/layers/SplitterLayer.cpp
+++ b/src/armnn/layers/SplitterLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "SplitterLayer.hpp"
@@ -131,11 +131,13 @@ void SplitterLayer::CreateTensors(const TensorHandleFactoryRegistry& registry,
// 2) the same TensorHandleFactory is used for input and split layer output
// 3) the output does not go to a Constant layer or input layer
// 4) if split along x or y (2 innermost dimensions) and the next layers do not require padding
+ // 5) none of the outputs have an Overridden TensorInfo
if (parentInfo.IsTypeSpaceMatch(info) && //(1)
factoryId == slot->GetTensorHandleFactoryId() && //(2)
GetOutputSlot(i).GetConnection(0)->GetOwningLayer().GetType() != LayerType::Constant && //(3)
GetOutputSlot(i).GetConnection(0)->GetOwningLayer().GetType() != LayerType::Input && //(3)
- canUseSubTensorOnXorY) //(4)
+ canUseSubTensorOnXorY && //(4)
+ !GetOutputSlot(i).GetConnection(0)->IsTensorInfoOverridden()) //(5)
{
ARMNN_NO_DEPRECATE_WARN_BEGIN
return factory.CreateSubTensorHandle(*inputData,
diff --git a/src/armnn/layers/StackLayer.cpp b/src/armnn/layers/StackLayer.cpp
index 3ebacaf3b5..3c5a216eb3 100644
--- a/src/armnn/layers/StackLayer.cpp
+++ b/src/armnn/layers/StackLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "StackLayer.hpp"
@@ -78,7 +78,7 @@ void StackLayer::ValidateTensorShapesFromInputs()
std::vector<TensorShape> inputShapes;
for (unsigned int i = 0; i < GetNumInputSlots(); ++i)
{
- TensorShape inputShape = GetInputSlot(i).GetConnection()->GetTensorInfo().GetShape();
+ TensorShape inputShape = GetInputSlot(i).GetTensorInfo().GetShape();
if (inputShape != m_Param.m_InputShape)
{
throw LayerValidationException("StackLayer: TensorShape set on InputSlot[" +
diff --git a/src/armnn/layers/StridedSliceLayer.cpp b/src/armnn/layers/StridedSliceLayer.cpp
index a179531306..16aeab5f5a 100644
--- a/src/armnn/layers/StridedSliceLayer.cpp
+++ b/src/armnn/layers/StridedSliceLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2018-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "StridedSliceLayer.hpp"
@@ -104,7 +104,7 @@ void StridedSliceLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape()});
+ auto inferredShapes = InferOutputShapes({GetInputSlot(0).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/SwitchLayer.cpp b/src/armnn/layers/SwitchLayer.cpp
index c2022fdcbb..031dcec29a 100644
--- a/src/armnn/layers/SwitchLayer.cpp
+++ b/src/armnn/layers/SwitchLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "SwitchLayer.hpp"
@@ -41,8 +41,8 @@ void SwitchLayer::ValidateTensorShapesFromInputs()
// Assuming first input is the Input and second input is the Constant
std::vector<TensorShape> inferredShapes = InferOutputShapes({
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape()});
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape()});
ARMNN_ASSERT(inferredShapes.size() == 2);
diff --git a/src/armnn/layers/TransposeConvolution2dLayer.cpp b/src/armnn/layers/TransposeConvolution2dLayer.cpp
index 534d6b431e..3a7e8b889e 100644
--- a/src/armnn/layers/TransposeConvolution2dLayer.cpp
+++ b/src/armnn/layers/TransposeConvolution2dLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -100,7 +100,7 @@ void TransposeConvolution2dLayer::ValidateTensorShapesFromInputs()
std::vector<TensorShape> expectedOutputShape;
std::vector<TensorShape> outputShapeGivenAsInput;
- expectedOutputShape = InferOutputShapes({GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
+ expectedOutputShape = InferOutputShapes({GetInputSlot(0).GetTensorInfo().GetShape(),
m_Weight->GetTensorInfo().GetShape() });
ARMNN_ASSERT(expectedOutputShape.size() == 1);
diff --git a/src/armnn/layers/TransposeLayer.cpp b/src/armnn/layers/TransposeLayer.cpp
index bc9e0acf7c..58e570ab38 100644
--- a/src/armnn/layers/TransposeLayer.cpp
+++ b/src/armnn/layers/TransposeLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -50,7 +50,7 @@ void TransposeLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
diff --git a/src/armnn/layers/UnidirectionalSequenceLstmLayer.cpp b/src/armnn/layers/UnidirectionalSequenceLstmLayer.cpp
index 7ae08834e6..75f027e32d 100644
--- a/src/armnn/layers/UnidirectionalSequenceLstmLayer.cpp
+++ b/src/armnn/layers/UnidirectionalSequenceLstmLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "UnidirectionalSequenceLstmLayer.hpp"
@@ -176,9 +176,9 @@ void UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs()
VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod);
auto inferredShapes = InferOutputShapes( {
- GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(1).GetConnection()->GetTensorInfo().GetShape(),
- GetInputSlot(2).GetConnection()->GetTensorInfo().GetShape()
+ GetInputSlot(0).GetTensorInfo().GetShape(),
+ GetInputSlot(1).GetTensorInfo().GetShape(),
+ GetInputSlot(2).GetTensorInfo().GetShape()
});
ARMNN_ASSERT(inferredShapes.size() == 1);