IVGCVSW-2646 Add Serializer & Deserializer for Conv2D

 * Added Convolution2dLayer to Schema.fbs
 * Added ConstTensorData serialization and deserialization helper functions
 * Added Convolution2d serialization and deserialization support
 * Added serialization and deserialization unit tests

Change-Id: Id376c08410ae01511972a2b0abdce9cfab907462
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
diff --git a/src/armnnSerializer/Schema.fbs b/src/armnnSerializer/Schema.fbs
index 2b96ad8..cbc7da0 100644
--- a/src/armnnSerializer/Schema.fbs
+++ b/src/armnnSerializer/Schema.fbs
@@ -74,7 +74,8 @@
     Output = 3,
     Pooling2d = 4,
     Reshape = 5,
-    Softmax = 6
+    Softmax = 6,
+    Convolution2d = 7
 }
 
 // Base layer table to be used as part of other layers
@@ -96,6 +97,24 @@
     base:LayerBase;
 }
 
+table Convolution2dLayer {
+    base:LayerBase;
+    descriptor:Convolution2dDescriptor;
+    weights:ConstTensor;
+    biases:ConstTensor;
+}
+
+table Convolution2dDescriptor {
+    padLeft:uint;
+    padRight:uint;
+    padTop:uint;
+    padBottom:uint;
+    strideX:uint;
+    strideY:uint;
+    biasEnabled:bool = false;
+    dataLayout:DataLayout = NCHW;
+}
+
 table InputLayer {
     base:BindableLayerBase;
 }
@@ -164,6 +183,7 @@
 
 union Layer {
     AdditionLayer,
+    Convolution2dLayer,
     InputLayer,
     MultiplicationLayer,
     OutputLayer,