From 3b0a2dad430654b0ad4124e5055a92d7c19ae786 Mon Sep 17 00:00:00 2001 From: arovir01 Date: Wed, 29 Aug 2018 10:16:58 +0100 Subject: IVGCVSW-1324: Added boost::optional convolution biases to ModelToINetworkConverter !armnn:145897 Change-Id: I9684c37bcac148bb5de0ee14d2af331956b511a8 --- ModelToINetworkConverter.cpp | 9 ++++++--- 1 file 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 #include #include +#include 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; } -- cgit v1.2.1