diff options
Diffstat (limited to 'src/armnn')
-rw-r--r-- | src/armnn/Network.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp index dec9468d7b..84997a61e7 100644 --- a/src/armnn/Network.cpp +++ b/src/armnn/Network.cpp @@ -1037,6 +1037,9 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork, // Get the optimized graph Graph& optGraph = optNetObjPtr->GetGraph(); + // Infer the tensor infos for all output slots. Throws an exception on failure + optGraph.InferTensorInfos(); + // Perform optimisation passes using namespace optimizations; Optimizer::Pass(optGraph, MakeOptimizations(SquashEqualPermuteSiblings(), @@ -1053,9 +1056,6 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork, PermuteAndBatchToSpaceAsDepthToSpace(), TransposeAndBatchToSpaceAsDepthToSpace())); - // Infer the tensor infos for all output slots. Throws an exception on failure - optGraph.InferTensorInfos(); - // If Fp32 to Fp16 optimization is set convert Fp32 network to Fp16 if (options.m_ReduceFp32ToFp16) { |