aboutsummaryrefslogtreecommitdiff
path: root/src/armnnSerializer/test/SerializerTests.cpp
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2022-02-09 15:13:38 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2022-02-16 10:26:39 +0000
commitbb6c6490b43036400e3c2ff90d3beafe074ab0b1 (patch)
tree49c05a44c00b0f009fa3913c45dc20496762ec5e /src/armnnSerializer/test/SerializerTests.cpp
parent154258132955f0bd74ef26a0cc20b7daca4d7b09 (diff)
downloadarmnn-bb6c6490b43036400e3c2ff90d3beafe074ab0b1.tar.gz
IVGCVSW-6399 Remove deprecated code 22.02 (FullyConnected)
* Remove deprecated INetwork::AddFullyconnectedLayer() taking weights as argument as they are now taken as separate input layers. * Updated test that was using the deprecated function. * Remove calls in pyarmnn Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Ibc52ac7fa57afd9033eb226bbc24a09e88a7d361
Diffstat (limited to 'src/armnnSerializer/test/SerializerTests.cpp')
-rw-r--r--src/armnnSerializer/test/SerializerTests.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/armnnSerializer/test/SerializerTests.cpp b/src/armnnSerializer/test/SerializerTests.cpp
index 632a80a748..966dc6c669 100644
--- a/src/armnnSerializer/test/SerializerTests.cpp
+++ b/src/armnnSerializer/test/SerializerTests.cpp
@@ -927,22 +927,21 @@ TEST_CASE("SerializeFullyConnected")
armnn::INetworkPtr network = armnn::INetwork::Create();
armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
-
- // Old way of handling constant tensors.
- ARMNN_NO_DEPRECATE_WARN_BEGIN
+ armnn::IConnectableLayer* const weightsInputLayer = network->AddInputLayer(1);
+ armnn::IConnectableLayer* const biasInputLayer = network->AddInputLayer(2);
armnn::IConnectableLayer* const fullyConnectedLayer =
- network->AddFullyConnectedLayer(descriptor,
- weights,
- armnn::Optional<armnn::ConstTensor>(biases),
- layerName.c_str());
- ARMNN_NO_DEPRECATE_WARN_END
-
+ network->AddFullyConnectedLayer(descriptor,
+ layerName.c_str());
armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
inputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(0));
+ weightsInputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(1));
+ biasInputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(2));
fullyConnectedLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
+ weightsInputLayer->GetOutputSlot(0).SetTensorInfo(weightsInfo);
+ biasInputLayer->GetOutputSlot(0).SetTensorInfo(biasesInfo);
fullyConnectedLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));