aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarovir01 <Aron.Virginas-Tar@arm.com>2018-08-29 10:16:58 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-09-18 12:40:20 +0100
commit3b0a2dad430654b0ad4124e5055a92d7c19ae786 (patch)
treeba58e8d5f61020bbf2147c56665e5433fe529faf
parentb1dc0c560d60d268b95935373604afa0425fc48d (diff)
downloadandroid-nn-driver-3b0a2dad430654b0ad4124e5055a92d7c19ae786.tar.gz
IVGCVSW-1324: Added boost::optional convolution biases to ModelToINetworkConverter
!armnn:145897 Change-Id: I9684c37bcac148bb5de0ee14d2af331956b511a8
-rw-r--r--ModelToINetworkConverter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/ModelToINetworkConverter.cpp b/ModelToINetworkConverter.cpp
index 3da56ef8..95ee8ef5 100644
--- a/ModelToINetworkConverter.cpp
+++ b/ModelToINetworkConverter.cpp
@@ -18,6 +18,7 @@
#include <boost/core/ignore_unused.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/cast.hpp>
+#include <boost/optional.hpp>
using namespace android::hardware;
@@ -992,7 +993,8 @@ bool ModelToINetworkConverter::ConvertConv2d(const neuralnetworks::V1_0::Operati
return Fail("%s: Unsupported number of operation inputs", __func__);
}
- desc.m_BiasEnabled = true;
+ desc.m_BiasEnabled = true;
+ auto biases = boost::make_optional(bias.GetInfo());
if (!IsLayerSupported(__func__,
armnn::IsConvolution2dSupported,
@@ -1001,7 +1003,7 @@ bool ModelToINetworkConverter::ConvertConv2d(const neuralnetworks::V1_0::Operati
swizzledOutputInfo,
desc,
weights.GetInfo(),
- bias.GetInfo()))
+ biases))
{
return false;
}
@@ -1114,6 +1116,7 @@ bool ModelToINetworkConverter::ConvertDepthwiseConv2d(const neuralnetworks::V1_0
}
desc.m_BiasEnabled = true;
+ auto biases = boost::make_optional(bias.GetInfo());
if (!IsLayerSupported(__func__,
armnn::IsDepthwiseConvolutionSupported,
@@ -1122,7 +1125,7 @@ bool ModelToINetworkConverter::ConvertDepthwiseConv2d(const neuralnetworks::V1_0
swizzledOutputInfo,
desc,
weights.GetInfo(),
- bias.GetInfo()))
+ biases))
{
return false;
}