IVGCVSW-1324: Added boost::optional convolution biases to ModelToINetworkConverter
!armnn:145897
Change-Id: I9684c37bcac148bb5de0ee14d2af331956b511a8
diff --git a/ModelToINetworkConverter.cpp b/ModelToINetworkConverter.cpp
index 3da56ef..95ee8ef 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 @@
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 @@
swizzledOutputInfo,
desc,
weights.GetInfo(),
- bias.GetInfo()))
+ biases))
{
return false;
}
@@ -1114,6 +1116,7 @@
}
desc.m_BiasEnabled = true;
+ auto biases = boost::make_optional(bias.GetInfo());
if (!IsLayerSupported(__func__,
armnn::IsDepthwiseConvolutionSupported,
@@ -1122,7 +1125,7 @@
swizzledOutputInfo,
desc,
weights.GetInfo(),
- bias.GetInfo()))
+ biases))
{
return false;
}