Use the new deprecation API
* Refactored the code to no longer use the deprecated methods where
applicable
!armnn:1125
Change-Id: I954c8497c098ea3578986eede612c55637fcd3d9
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp
index fa29f86..121379a 100644
--- a/1.0/HalPolicy.cpp
+++ b/1.0/HalPolicy.cpp
@@ -434,7 +434,8 @@
return false;
}
- armnn::IConnectableLayer* startLayer = data.m_Network->AddConvolution2dLayer(desc, weights, bias);
+ armnn::IConnectableLayer* startLayer =
+ data.m_Network->AddConvolution2dLayer(desc, weights, armnn::Optional<armnn::ConstTensor>(bias));
if (!startLayer)
{
@@ -560,7 +561,8 @@
return false;
}
- armnn::IConnectableLayer* startLayer = data.m_Network->AddDepthwiseConvolution2dLayer(desc, weights, bias);
+ armnn::IConnectableLayer* startLayer =
+ data.m_Network->AddDepthwiseConvolution2dLayer(desc, weights, armnn::Optional<armnn::ConstTensor>(bias));
if (!startLayer)
{
return Fail("%s: AddDepthwiseConvolution2dLayer failed", __func__);
@@ -669,7 +671,8 @@
return false;
}
- armnn::IConnectableLayer* startLayer = data.m_Network->AddFullyConnectedLayer(desc, weights, bias);
+ armnn::IConnectableLayer* startLayer =
+ data.m_Network->AddFullyConnectedLayer(desc, weights, armnn::Optional<armnn::ConstTensor>(bias));
armnn::IConnectableLayer* endLayer = ProcessActivation(outputInfo, activationFunction, startLayer, data);
if (endLayer != nullptr)