From af484013329a8ca5b3c4c9d16395fb79dd19b1b2 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Wed, 20 Feb 2019 16:53:11 +0000 Subject: 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 --- src/armnnSerializer/Schema.fbs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/armnnSerializer/Schema.fbs') diff --git a/src/armnnSerializer/Schema.fbs b/src/armnnSerializer/Schema.fbs index 1b7427b185..e81365166f 100644 --- a/src/armnnSerializer/Schema.fbs +++ b/src/armnnSerializer/Schema.fbs @@ -9,6 +9,19 @@ file_identifier "ARMN"; 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 @@ enum LayerType : uint { 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 BindableLayerBase { } // 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 @@ table ReshapeDescriptor { } union Layer { + ActivationLayer, AdditionLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, -- cgit v1.2.1