aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfLiteParser/TfLiteParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnTfLiteParser/TfLiteParser.cpp')
-rw-r--r--src/armnnTfLiteParser/TfLiteParser.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/armnnTfLiteParser/TfLiteParser.cpp b/src/armnnTfLiteParser/TfLiteParser.cpp
index aa07f7b3f9..49f1f9f856 100644
--- a/src/armnnTfLiteParser/TfLiteParser.cpp
+++ b/src/armnnTfLiteParser/TfLiteParser.cpp
@@ -793,16 +793,27 @@ INetworkPtr TfLiteParserImpl::CreateNetworkFromModel()
using NetworkOptions = std::vector<BackendOptions>;
NetworkOptions networkOptions = {};
- if (m_Options && m_Options.value().m_InferAndValidate)
+ if (m_Options)
{
- BackendOptions shapeInferenceMethodOption("ShapeInferenceMethod",
- {
- { "InferAndValidate", true }
- });
+ if (m_Options.value().m_InferAndValidate)
+ {
+ BackendOptions shapeInferenceMethodOption("ShapeInferenceMethod",
+ {
+ { "InferAndValidate", true }
+ });
- networkOptions.push_back(shapeInferenceMethodOption);
- }
+ networkOptions.push_back(shapeInferenceMethodOption);
+ }
+ if (m_Options.value().m_AllowExpandedDims)
+ {
+ BackendOptions shapeInferenceMethodOption("AllowExpandedDims",
+ {
+ { "AllowExpandedDims", true }
+ });
+ networkOptions.push_back(shapeInferenceMethodOption);
+ }
+ }
m_Network = INetwork::Create(networkOptions);
ARMNN_ASSERT(m_Model.get() != nullptr);