Fold PAD into Pooling2d if possible

Some models would add a PAD layer before a pooling when they can't
express their padding configuration as SAME or VALID.

ArmNN can potentially merge the two merge the two because pooling
layers are described with explicit padding.

The merge is possible if the extra padding is neutral in the combined
pooling operation. A merged operation can only fuse paddings in the
dimensions that accept explicit padding in a pooling operation, i.e. the
spatial dimensions.

Signed-off-by: Diego Lopez Recas <diego.lopez.recas@gmail.com>
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>

Change-Id: Icd54718dcd9e797c923456b7fa6e0213e288e668
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index 860048f..c99690e 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -1563,6 +1563,7 @@
                                                 TransposeAsReshape(),
                                                 OptimizeConsecutiveReshapes(),
                                                 FoldPadIntoConvolution2d(),
+                                                FoldPadIntoPooling2d(),
                                                 PermuteAndBatchToSpaceAsDepthToSpace(),
                                                 TransposeAndBatchToSpaceAsDepthToSpace(),
                                                 FuseBatchNormIntoConvolution2DFloat32(),