aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-05-14 13:28:21 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-05-14 13:32:50 +0100
commitba01f37cdda3ec51ca4efca3d92f978bdbaed54d (patch)
tree24c82d7a5bf86682bda450801d5ae0b1b1c15110
parent073d7a3e829dd52f47bcd4e2d0ab4b04cc811b32 (diff)
downloadandroid-nn-driver-ba01f37cdda3ec51ca4efca3d92f978bdbaed54d.tar.gz
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>
-rw-r--r--1.0/HalPolicy.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp
index fa29f860..121379ac 100644
--- a/1.0/HalPolicy.cpp
+++ b/1.0/HalPolicy.cpp
@@ -434,7 +434,8 @@ bool HalPolicy::ConvertConv2d(const Operation& operation, const Model& model, Co
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 @@ bool HalPolicy::ConvertDepthwiseConv2d(const Operation& operation, const Model&
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 @@ bool HalPolicy::ConvertFullyConnected(const Operation& operation, const Model& m
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)