From fc598e15ff30bc375c95c9536d4a56662d867926 Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Tue, 14 May 2019 10:36:13 +0100 Subject: Use the new deprecation API * Used the new ARMNN_DEPRECATED_MSG macro instead of @deprecated * Refactored the code to no longer use the deprecated methods where applicable !android-nn-driver:1126 Change-Id: Ib0578d3d6fc5a763f5fb922f67ba91fafc7796f6 Signed-off-by: Matteo Martincigh --- src/armnnSerializer/test/SerializerTests.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/armnnSerializer') diff --git a/src/armnnSerializer/test/SerializerTests.cpp b/src/armnnSerializer/test/SerializerTests.cpp index 4b3a09e47c..42111e6155 100644 --- a/src/armnnSerializer/test/SerializerTests.cpp +++ b/src/armnnSerializer/test/SerializerTests.cpp @@ -490,7 +490,10 @@ BOOST_AUTO_TEST_CASE(SerializeConvolution2d) armnn::INetworkPtr network = armnn::INetwork::Create(); armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0); armnn::IConnectableLayer* const convLayer = - network->AddConvolution2dLayer(descriptor, weights, biases, layerName.c_str()); + network->AddConvolution2dLayer(descriptor, + weights, + armnn::Optional(biases), + layerName.c_str()); armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0); inputLayer->GetOutputSlot(0).Connect(convLayer->GetInputSlot(0)); @@ -580,7 +583,10 @@ BOOST_AUTO_TEST_CASE(SerializeDepthwiseConvolution2d) armnn::INetworkPtr network = armnn::INetwork::Create(); armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0); armnn::IConnectableLayer* const depthwiseConvLayer = - network->AddDepthwiseConvolution2dLayer(descriptor, weights, biases, layerName.c_str()); + network->AddDepthwiseConvolution2dLayer(descriptor, + weights, + armnn::Optional(biases), + layerName.c_str()); armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0); inputLayer->GetOutputSlot(0).Connect(depthwiseConvLayer->GetInputSlot(0)); @@ -925,7 +931,10 @@ BOOST_AUTO_TEST_CASE(SerializeFullyConnected) armnn::INetworkPtr network = armnn::INetwork::Create(); armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0); armnn::IConnectableLayer* const fullyConnectedLayer = - network->AddFullyConnectedLayer(descriptor, weights, biases, layerName.c_str()); + network->AddFullyConnectedLayer(descriptor, + weights, + armnn::Optional(biases), + layerName.c_str()); armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0); inputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(0)); -- cgit v1.2.1