NNXSW-1826 Add an optimization step which combines Permute and BatchToSpace into DepthToSpace

This is only possible in some limited cases, but removes an extra
layer from the graph and so should improve performance in all cases.

Change-Id: I7b3e6ba5dacb4fdb816ad270edaecda1436ab4cf
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index a668274..cf9a138 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -818,7 +818,8 @@
                                                 MovePermuteUp(),
                                                 PermuteAsReshape(),
                                                 OptimizeConsecutiveReshapes(),
-                                                FoldPadIntoConvolution2d()));
+                                                FoldPadIntoConvolution2d(),
+                                                PermuteAndBatchToSpaceAsDepthToSpace()));
 
     // Infer the tensor infos for all output slots. Throws an exception on failure
     optGraph.InferTensorInfos();