IVGCVSW-2643 Add Serializer & Deserializer for Activation
* Added ActivationLayer to Schema.fbs
* Added Activation serialization and deserialization support
* Added serialization and deserialization unit tests
Change-Id: Ib5df45f123674988b994ffe3f111d3fb57864912
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
diff --git a/src/armnnSerializer/Schema.fbs b/src/armnnSerializer/Schema.fbs
index 1b7427b..e813651 100644
--- a/src/armnnSerializer/Schema.fbs
+++ b/src/armnnSerializer/Schema.fbs
@@ -9,6 +9,19 @@
file_extension "armnn";
+enum ActivationFunction : byte {
+ Sigmoid = 0,
+ TanH = 1,
+ Linear = 2,
+ ReLu = 3,
+ BoundedReLu = 4,
+ SoftReLu = 5,
+ LeakyReLu = 6,
+ Abs = 7,
+ Sqrt = 8,
+ Square = 9
+}
+
enum DataType : byte {
Float16 = 0,
Float32 = 1,
@@ -76,7 +89,8 @@
Reshape = 5,
Softmax = 6,
Convolution2d = 7,
- DepthwiseConvolution2d = 8
+ DepthwiseConvolution2d = 8,
+ Activation = 9
}
// Base layer table to be used as part of other layers
@@ -94,6 +108,17 @@
}
// Table for each layer defined below
+table ActivationLayer {
+ base:LayerBase;
+ descriptor:ActivationDescriptor;
+}
+
+table ActivationDescriptor {
+ function:ActivationFunction = Sigmoid;
+ a:float;
+ b:float;
+}
+
table AdditionLayer {
base:LayerBase;
}
@@ -201,6 +226,7 @@
}
union Layer {
+ ActivationLayer,
AdditionLayer,
Convolution2dLayer,
DepthwiseConvolution2dLayer,