Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
Derek Lamberti | 0028d1b | 2019-02-20 13:57:42 +0000 | [diff] [blame] | 6 | namespace armnnSerializer; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 7 | |
| 8 | file_identifier "ARMN"; |
| 9 | |
| 10 | file_extension "armnn"; |
| 11 | |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 12 | enum ActivationFunction : byte { |
| 13 | Sigmoid = 0, |
| 14 | TanH = 1, |
| 15 | Linear = 2, |
| 16 | ReLu = 3, |
| 17 | BoundedReLu = 4, |
| 18 | SoftReLu = 5, |
| 19 | LeakyReLu = 6, |
| 20 | Abs = 7, |
| 21 | Sqrt = 8, |
David Monahan | 3b3c381 | 2020-02-25 09:03:29 +0000 | [diff] [blame] | 22 | Square = 9, |
Colm Donelan | 03fbeaf | 2020-02-26 15:39:23 +0000 | [diff] [blame] | 23 | Elu = 10, |
| 24 | HardSwish = 11 |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 25 | } |
| 26 | |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 27 | enum ArgMinMaxFunction : byte { |
| 28 | Min = 0, |
| 29 | Max = 1 |
| 30 | } |
| 31 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 32 | enum DataType : byte { |
| 33 | Float16 = 0, |
| 34 | Float32 = 1, |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 35 | QuantisedAsymm8 = 2, // deprecated |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 36 | Signed32 = 3, |
Nattapat Chaimanowong | cd5ac23 | 2019-03-19 12:26:36 +0000 | [diff] [blame] | 37 | Boolean = 4, |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 38 | QuantisedSymm16 = 5, // deprecated |
| 39 | QAsymmU8 = 6, |
Francis Murtagh | ddb1d06 | 2020-03-10 13:51:45 +0000 | [diff] [blame] | 40 | QSymmS16 = 7, |
Sadik Armagan | 1a84fe3 | 2020-03-27 15:56:57 +0000 | [diff] [blame] | 41 | QAsymmS8 = 8, |
| 42 | QSymmS8 = 9 |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 45 | enum DataLayout : byte { |
| 46 | NHWC = 0, |
| 47 | NCHW = 1 |
| 48 | } |
| 49 | |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 50 | enum ResizeMethod: byte { |
| 51 | NearestNeighbor = 0, |
| 52 | Bilinear = 1, |
| 53 | } |
| 54 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 55 | table TensorInfo { |
| 56 | dimensions:[uint]; |
| 57 | dataType:DataType; |
Sadik Armagan | 1a84fe3 | 2020-03-27 15:56:57 +0000 | [diff] [blame] | 58 | quantizationScale:float = 1.0; // @deprecated Use quantizationScales instead |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 59 | quantizationOffset:int = 0; |
Sadik Armagan | 1a84fe3 | 2020-03-27 15:56:57 +0000 | [diff] [blame] | 60 | quantizationScales:[float]; |
| 61 | quantizationDim:uint; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | struct Connection { |
| 65 | sourceLayerIndex:uint; |
| 66 | outputSlotIndex:uint; |
| 67 | } |
| 68 | |
| 69 | table ByteData { |
| 70 | data:[byte]; |
| 71 | } |
| 72 | |
| 73 | table ShortData { |
| 74 | data:[short]; |
| 75 | } |
| 76 | |
| 77 | table IntData { |
| 78 | data:[int]; |
| 79 | } |
| 80 | |
| 81 | table LongData { |
| 82 | data:[long]; |
| 83 | } |
| 84 | |
| 85 | union ConstTensorData { ByteData, ShortData, IntData, LongData } |
| 86 | |
| 87 | table ConstTensor { |
| 88 | info:TensorInfo; |
| 89 | data:ConstTensorData; |
| 90 | } |
| 91 | |
| 92 | table InputSlot { |
| 93 | index:uint; |
| 94 | connection:Connection; |
| 95 | } |
| 96 | |
| 97 | table OutputSlot { |
| 98 | index:uint; |
| 99 | tensorInfo:TensorInfo; |
| 100 | } |
| 101 | |
| 102 | enum LayerType : uint { |
| 103 | Addition = 0, |
| 104 | Input = 1, |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 105 | Multiplication = 2, |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 106 | Output = 3, |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 107 | Pooling2d = 4, |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 108 | Reshape = 5, |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 109 | Softmax = 6, |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 110 | Convolution2d = 7, |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 111 | DepthwiseConvolution2d = 8, |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 112 | Activation = 9, |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 113 | Permute = 10, |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 114 | FullyConnected = 11, |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 115 | Constant = 12, |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 116 | SpaceToBatchNd = 13, |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 117 | BatchToSpaceNd = 14, |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 118 | Division = 15, |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 119 | Minimum = 16, |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 120 | Equal = 17, |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 121 | Maximum = 18, |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 122 | Normalization = 19, |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 123 | Pad = 20, |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 124 | Rsqrt = 21, |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 125 | Floor = 22, |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 126 | BatchNormalization = 23, |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 127 | Greater = 24, |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 128 | ResizeBilinear = 25, |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 129 | Subtraction = 26, |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 130 | StridedSlice = 27, |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 131 | Gather = 28, |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 132 | Mean = 29, |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 133 | Merger = 30, |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 134 | L2Normalization = 31, |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 135 | Splitter = 32, |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 136 | DetectionPostProcess = 33, |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 137 | Lstm = 34, |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 138 | Quantize = 35, |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 139 | Dequantize = 36, |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 140 | Merge = 37, |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 141 | Switch = 38, |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 142 | Concat = 39, |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 143 | SpaceToDepth = 40, |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 144 | Prelu = 41, |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 145 | TransposeConvolution2d = 42, |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 146 | Resize = 43, |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 147 | Stack = 44, |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 148 | QuantizedLstm = 45, |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 149 | Abs = 46, |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 150 | ArgMinMax = 47, |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 151 | Slice = 48, |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 152 | DepthToSpace = 49, |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 153 | InstanceNormalization = 50, |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 154 | LogSoftmax = 51, |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 155 | Comparison = 52, |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 156 | StandIn = 53, |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 157 | ElementwiseUnary = 54, |
James Conroy | 8d33318 | 2020-05-13 10:27:58 +0100 | [diff] [blame^] | 158 | Transpose = 55, |
| 159 | QLstm = 56 |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | // Base layer table to be used as part of other layers |
| 163 | table LayerBase { |
| 164 | index:uint; |
| 165 | layerName:string; |
| 166 | layerType:LayerType; |
| 167 | inputSlots:[InputSlot]; |
| 168 | outputSlots:[OutputSlot]; |
| 169 | } |
| 170 | |
| 171 | table BindableLayerBase { |
| 172 | base:LayerBase; |
| 173 | layerBindingId:int; |
| 174 | } |
| 175 | |
| 176 | // Table for each layer defined below |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 177 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 178 | /// @deprecated Use ElementwiseUnaryLayer instead |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 179 | table AbsLayer { |
| 180 | base:LayerBase; |
| 181 | } |
| 182 | |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 183 | table ActivationLayer { |
| 184 | base:LayerBase; |
| 185 | descriptor:ActivationDescriptor; |
| 186 | } |
| 187 | |
| 188 | table ActivationDescriptor { |
Tee Jung | 86bc3d8 | 2019-10-01 11:25:56 +0900 | [diff] [blame] | 189 | activationFunction:ActivationFunction = Sigmoid; |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 190 | a:float; |
| 191 | b:float; |
| 192 | } |
| 193 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 194 | table AdditionLayer { |
| 195 | base:LayerBase; |
| 196 | } |
| 197 | |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 198 | table ArgMinMaxLayer { |
| 199 | base:LayerBase; |
| 200 | descriptor:ArgMinMaxDescriptor; |
| 201 | } |
| 202 | |
| 203 | table ArgMinMaxDescriptor{ |
Tee Jung | 86bc3d8 | 2019-10-01 11:25:56 +0900 | [diff] [blame] | 204 | argMinMaxFunction:ArgMinMaxFunction; |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 205 | axis:int; |
| 206 | } |
| 207 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 208 | enum ComparisonOperation : byte { |
| 209 | Equal = 0, |
| 210 | Greater = 1, |
| 211 | GreaterOrEqual = 2, |
| 212 | Less = 3, |
| 213 | LessOrEqual = 4, |
| 214 | NotEqual = 5 |
| 215 | } |
| 216 | |
| 217 | table ComparisonDescriptor { |
| 218 | operation:ComparisonOperation; |
| 219 | } |
| 220 | |
| 221 | table ComparisonLayer { |
| 222 | base:LayerBase; |
| 223 | descriptor:ComparisonDescriptor; |
| 224 | } |
| 225 | |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 226 | table ConstantLayer { |
| 227 | base:LayerBase; |
| 228 | input:ConstTensor; |
| 229 | } |
| 230 | |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 231 | table Convolution2dLayer { |
| 232 | base:LayerBase; |
| 233 | descriptor:Convolution2dDescriptor; |
| 234 | weights:ConstTensor; |
| 235 | biases:ConstTensor; |
| 236 | } |
| 237 | |
| 238 | table Convolution2dDescriptor { |
| 239 | padLeft:uint; |
| 240 | padRight:uint; |
| 241 | padTop:uint; |
| 242 | padBottom:uint; |
| 243 | strideX:uint; |
| 244 | strideY:uint; |
Matthew Bentham | acad04e | 2019-05-13 10:02:45 +0100 | [diff] [blame] | 245 | dilationX:uint = 1; |
| 246 | dilationY:uint = 1; |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 247 | biasEnabled:bool = false; |
| 248 | dataLayout:DataLayout = NCHW; |
| 249 | } |
| 250 | |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 251 | table DepthToSpaceLayer { |
| 252 | base:LayerBase; |
| 253 | descriptor:DepthToSpaceDescriptor; |
| 254 | } |
| 255 | |
| 256 | table DepthToSpaceDescriptor { |
| 257 | blockSize:uint; |
| 258 | dataLayout:DataLayout; |
| 259 | } |
| 260 | |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 261 | table DivisionLayer { |
| 262 | base:LayerBase; |
| 263 | } |
| 264 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 265 | enum UnaryOperation : byte { |
| 266 | Abs = 0, |
| 267 | Rsqrt = 1, |
| 268 | Sqrt = 2, |
| 269 | Exp = 3, |
| 270 | Neg = 4 |
| 271 | } |
| 272 | |
| 273 | table ElementwiseUnaryDescriptor { |
| 274 | operation:UnaryOperation; |
| 275 | } |
| 276 | |
| 277 | table ElementwiseUnaryLayer { |
| 278 | base:LayerBase; |
| 279 | descriptor:ElementwiseUnaryDescriptor; |
| 280 | } |
| 281 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 282 | /// @deprecated Use ComparisonLayer instead |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 283 | table EqualLayer { |
| 284 | base:LayerBase; |
| 285 | } |
| 286 | |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 287 | table FloorLayer{ |
| 288 | base:LayerBase; |
| 289 | } |
| 290 | |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 291 | table FullyConnectedLayer { |
| 292 | base:LayerBase; |
| 293 | descriptor:FullyConnectedDescriptor; |
| 294 | weights:ConstTensor; |
| 295 | biases:ConstTensor; |
| 296 | } |
| 297 | |
| 298 | table FullyConnectedDescriptor { |
| 299 | biasEnabled:bool = false; |
| 300 | transposeWeightsMatrix:bool = false; |
| 301 | } |
| 302 | |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 303 | table GatherLayer { |
| 304 | base:LayerBase; |
| 305 | } |
| 306 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 307 | /// @deprecated Use ComparisonLayer instead |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 308 | table GreaterLayer { |
| 309 | base:LayerBase; |
| 310 | } |
| 311 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 312 | table InputLayer { |
| 313 | base:BindableLayerBase; |
| 314 | } |
| 315 | |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 316 | table InstanceNormalizationLayer { |
| 317 | base:LayerBase; |
| 318 | descriptor:InstanceNormalizationDescriptor; |
| 319 | } |
| 320 | |
| 321 | table InstanceNormalizationDescriptor { |
| 322 | gamma:float; |
| 323 | beta:float; |
| 324 | eps:float; |
| 325 | dataLayout:DataLayout; |
| 326 | } |
| 327 | |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 328 | table LogSoftmaxLayer { |
| 329 | base:LayerBase; |
| 330 | descriptor:LogSoftmaxDescriptor; |
| 331 | } |
| 332 | |
| 333 | table LogSoftmaxDescriptor { |
| 334 | beta:float = 1; |
| 335 | axis:int = -1; |
| 336 | } |
| 337 | |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 338 | table L2NormalizationLayer { |
| 339 | base:LayerBase; |
| 340 | descriptor:L2NormalizationDescriptor; |
| 341 | } |
| 342 | |
| 343 | table L2NormalizationDescriptor { |
| 344 | dataLayout:DataLayout = NCHW; |
Ferran Balaguer | 0dcffec | 2019-06-18 16:25:06 +0100 | [diff] [blame] | 345 | eps:float = 1e-12; |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 346 | } |
| 347 | |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 348 | table MinimumLayer { |
| 349 | base:LayerBase; |
| 350 | } |
| 351 | |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 352 | table MaximumLayer { |
| 353 | base:LayerBase; |
| 354 | } |
| 355 | |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 356 | table MultiplicationLayer { |
| 357 | base:LayerBase; |
| 358 | } |
| 359 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 360 | table Pooling2dLayer { |
| 361 | base:LayerBase; |
| 362 | descriptor:Pooling2dDescriptor; |
| 363 | } |
| 364 | |
| 365 | enum PoolingAlgorithm : byte { |
| 366 | Max = 0, |
| 367 | Average = 1, |
| 368 | L2 = 2 |
| 369 | } |
| 370 | |
| 371 | enum OutputShapeRounding : byte { |
| 372 | Floor = 0, |
| 373 | Ceiling = 1 |
| 374 | } |
| 375 | |
| 376 | enum PaddingMethod : byte { |
| 377 | IgnoreValue = 0, |
| 378 | Exclude = 1 |
| 379 | } |
| 380 | |
| 381 | table Pooling2dDescriptor { |
| 382 | poolType:PoolingAlgorithm; |
| 383 | padLeft:uint; |
| 384 | padRight:uint; |
| 385 | padTop:uint; |
| 386 | padBottom:uint; |
| 387 | poolWidth:uint; |
| 388 | poolHeight:uint; |
| 389 | strideX:uint; |
| 390 | strideY:uint; |
| 391 | outputShapeRounding:OutputShapeRounding; |
| 392 | paddingMethod:PaddingMethod; |
| 393 | dataLayout:DataLayout; |
| 394 | } |
| 395 | |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 396 | table QuantizeLayer { |
| 397 | base:LayerBase; |
| 398 | } |
| 399 | |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 400 | table SoftmaxLayer { |
| 401 | base:LayerBase; |
| 402 | descriptor:SoftmaxDescriptor; |
| 403 | } |
| 404 | |
| 405 | table SoftmaxDescriptor { |
| 406 | beta:float; |
| 407 | } |
| 408 | |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 409 | table DepthwiseConvolution2dLayer { |
| 410 | base:LayerBase; |
| 411 | descriptor:DepthwiseConvolution2dDescriptor; |
| 412 | weights:ConstTensor; |
| 413 | biases:ConstTensor; |
| 414 | } |
| 415 | |
| 416 | table DepthwiseConvolution2dDescriptor { |
| 417 | padLeft:uint; |
| 418 | padRight:uint; |
| 419 | padTop:uint; |
| 420 | padBottom:uint; |
| 421 | strideX:uint; |
| 422 | strideY:uint; |
Matthew Bentham | acad04e | 2019-05-13 10:02:45 +0100 | [diff] [blame] | 423 | dilationX:uint = 1; |
| 424 | dilationY:uint = 1; |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 425 | biasEnabled:bool = false; |
| 426 | dataLayout:DataLayout = NCHW; |
| 427 | } |
| 428 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 429 | table OutputLayer { |
| 430 | base:BindableLayerBase; |
| 431 | } |
| 432 | |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 433 | table ReshapeLayer { |
| 434 | base:LayerBase; |
| 435 | descriptor:ReshapeDescriptor; |
| 436 | } |
| 437 | |
| 438 | table ReshapeDescriptor { |
| 439 | targetShape:[uint]; |
| 440 | } |
| 441 | |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 442 | table PermuteLayer { |
| 443 | base:LayerBase; |
| 444 | descriptor:PermuteDescriptor; |
| 445 | } |
| 446 | |
| 447 | table PermuteDescriptor { |
| 448 | dimMappings:[uint]; |
| 449 | } |
| 450 | |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 451 | table SpaceToBatchNdLayer { |
| 452 | base:LayerBase; |
| 453 | descriptor:SpaceToBatchNdDescriptor; |
| 454 | } |
| 455 | |
| 456 | table SpaceToBatchNdDescriptor { |
| 457 | blockShape:[uint]; |
| 458 | padList:[uint]; |
| 459 | dataLayout:DataLayout; |
| 460 | } |
| 461 | |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 462 | table SpaceToDepthLayer { |
| 463 | base:LayerBase; |
| 464 | descriptor:SpaceToDepthDescriptor; |
| 465 | } |
| 466 | |
| 467 | table SpaceToDepthDescriptor { |
| 468 | blockSize:uint; |
| 469 | dataLayout:DataLayout; |
| 470 | } |
| 471 | |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 472 | table SubtractionLayer { |
| 473 | base:LayerBase; |
| 474 | } |
| 475 | |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 476 | table BatchToSpaceNdLayer { |
| 477 | base:LayerBase; |
| 478 | descriptor:BatchToSpaceNdDescriptor; |
| 479 | } |
| 480 | |
| 481 | table BatchToSpaceNdDescriptor { |
| 482 | blockShape:[uint]; |
| 483 | crops:[uint]; |
| 484 | dataLayout:DataLayout; |
| 485 | } |
| 486 | |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 487 | enum NormalizationAlgorithmChannel : byte { |
| 488 | Across = 0, |
| 489 | Within = 1 |
| 490 | } |
| 491 | |
| 492 | enum NormalizationAlgorithmMethod : byte { |
| 493 | LocalBrightness = 0, |
| 494 | LocalContrast = 1 |
| 495 | } |
| 496 | |
| 497 | table NormalizationLayer { |
| 498 | base:LayerBase; |
| 499 | descriptor:NormalizationDescriptor; |
| 500 | } |
| 501 | |
| 502 | table NormalizationDescriptor { |
| 503 | normChannelType:NormalizationAlgorithmChannel = Across; |
| 504 | normMethodType:NormalizationAlgorithmMethod = LocalBrightness; |
| 505 | normSize:uint; |
| 506 | alpha:float; |
| 507 | beta:float; |
| 508 | k:float; |
| 509 | dataLayout:DataLayout = NCHW; |
| 510 | } |
| 511 | |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 512 | table MeanLayer { |
| 513 | base:LayerBase; |
| 514 | descriptor:MeanDescriptor; |
| 515 | } |
| 516 | |
| 517 | table MeanDescriptor { |
| 518 | axis:[uint]; |
| 519 | keepDims:bool = false; |
| 520 | } |
| 521 | |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 522 | table PadLayer { |
| 523 | base:LayerBase; |
| 524 | descriptor:PadDescriptor; |
| 525 | } |
| 526 | |
| 527 | table PadDescriptor { |
| 528 | padList:[uint]; |
David Monahan | 3475781 | 2019-06-19 11:47:21 +0100 | [diff] [blame] | 529 | padValue:float = 0; |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 530 | } |
| 531 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 532 | /// @deprecated Use ElementwiseUnaryLayer instead |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 533 | table RsqrtLayer { |
| 534 | base:LayerBase; |
| 535 | } |
| 536 | |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 537 | table BatchNormalizationLayer { |
| 538 | base:LayerBase; |
| 539 | descriptor:BatchNormalizationDescriptor; |
| 540 | mean:ConstTensor; |
| 541 | variance:ConstTensor; |
| 542 | beta:ConstTensor; |
| 543 | gamma:ConstTensor; |
| 544 | } |
| 545 | |
| 546 | table BatchNormalizationDescriptor { |
| 547 | eps:float; |
| 548 | dataLayout:DataLayout; |
| 549 | } |
| 550 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 551 | /// @deprecated Use ResizeLayer instead |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 552 | table ResizeBilinearLayer { |
| 553 | base:LayerBase; |
| 554 | descriptor:ResizeBilinearDescriptor; |
| 555 | } |
| 556 | |
| 557 | table ResizeBilinearDescriptor { |
| 558 | targetWidth:uint; |
| 559 | targetHeight:uint; |
| 560 | dataLayout:DataLayout; |
| 561 | } |
| 562 | |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 563 | table SliceLayer { |
| 564 | base:LayerBase; |
| 565 | descriptor:SliceDescriptor; |
| 566 | } |
| 567 | |
| 568 | table SliceDescriptor { |
| 569 | begin:[uint]; |
| 570 | size:[uint]; |
| 571 | } |
| 572 | |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 573 | table StridedSliceLayer { |
| 574 | base:LayerBase; |
| 575 | descriptor:StridedSliceDescriptor; |
| 576 | } |
| 577 | |
| 578 | table StridedSliceDescriptor { |
| 579 | begin:[int]; |
| 580 | end:[int]; |
| 581 | stride:[int]; |
| 582 | beginMask:int; |
| 583 | endMask:int; |
| 584 | shrinkAxisMask:int; |
| 585 | ellipsisMask:int; |
| 586 | newAxisMask:int; |
| 587 | dataLayout:DataLayout; |
| 588 | } |
| 589 | |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 590 | table ConcatLayer { |
| 591 | base:LayerBase; |
| 592 | descriptor:OriginsDescriptor; |
| 593 | } |
| 594 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 595 | /// @deprecated Use ConcatLayer instead |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 596 | table MergerLayer { |
| 597 | base:LayerBase; |
| 598 | descriptor:OriginsDescriptor; |
| 599 | } |
| 600 | |
| 601 | table UintVector { |
| 602 | data:[uint]; |
| 603 | } |
| 604 | |
| 605 | table OriginsDescriptor { |
| 606 | concatAxis:uint; |
| 607 | numViews:uint; |
| 608 | numDimensions:uint; |
| 609 | viewOrigins:[UintVector]; |
| 610 | } |
| 611 | |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 612 | table ViewsDescriptor { |
| 613 | origins:OriginsDescriptor; |
| 614 | viewSizes:[UintVector]; |
| 615 | } |
| 616 | |
| 617 | table SplitterLayer { |
| 618 | base:LayerBase; |
| 619 | descriptor:ViewsDescriptor; |
| 620 | } |
| 621 | |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 622 | table DetectionPostProcessLayer { |
| 623 | base:LayerBase; |
| 624 | descriptor:DetectionPostProcessDescriptor; |
| 625 | anchors:ConstTensor; |
| 626 | } |
| 627 | |
| 628 | table DetectionPostProcessDescriptor { |
| 629 | maxDetections:uint; |
| 630 | maxClassesPerDetection:uint; |
| 631 | detectionsPerClass:uint; |
| 632 | nmsScoreThreshold:float; |
| 633 | nmsIouThreshold:float; |
| 634 | numClasses:uint; |
| 635 | useRegularNms:bool; |
| 636 | scaleX:float; |
| 637 | scaleY:float; |
| 638 | scaleW:float; |
| 639 | scaleH:float; |
| 640 | } |
| 641 | |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 642 | table LstmInputParams { |
| 643 | inputToForgetWeights:ConstTensor; |
| 644 | inputToCellWeights:ConstTensor; |
| 645 | inputToOutputWeights:ConstTensor; |
| 646 | recurrentToForgetWeights:ConstTensor; |
| 647 | recurrentToCellWeights:ConstTensor; |
| 648 | recurrentToOutputWeights:ConstTensor; |
| 649 | forgetGateBias:ConstTensor; |
| 650 | cellBias:ConstTensor; |
| 651 | outputGateBias:ConstTensor; |
| 652 | |
| 653 | inputToInputWeights:ConstTensor; |
| 654 | recurrentToInputWeights:ConstTensor; |
| 655 | cellToInputWeights:ConstTensor; |
| 656 | inputGateBias:ConstTensor; |
| 657 | |
| 658 | projectionWeights:ConstTensor; |
| 659 | projectionBias:ConstTensor; |
| 660 | |
| 661 | cellToForgetWeights:ConstTensor; |
| 662 | cellToOutputWeights:ConstTensor; |
Jan Eilers | f8c6297 | 2019-07-17 11:07:49 +0100 | [diff] [blame] | 663 | |
| 664 | inputLayerNormWeights:ConstTensor; |
| 665 | forgetLayerNormWeights:ConstTensor; |
| 666 | cellLayerNormWeights:ConstTensor; |
| 667 | outputLayerNormWeights:ConstTensor; |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 668 | } |
| 669 | |
James Conroy | 8d33318 | 2020-05-13 10:27:58 +0100 | [diff] [blame^] | 670 | table LstmDescriptor { |
| 671 | activationFunc:uint; |
| 672 | clippingThresCell:float; |
| 673 | clippingThresProj:float; |
| 674 | cifgEnabled:bool = true; |
| 675 | peepholeEnabled:bool = false; |
| 676 | projectionEnabled:bool = false; |
| 677 | layerNormEnabled:bool = false; |
| 678 | } |
| 679 | |
| 680 | table LstmLayer { |
| 681 | base:LayerBase; |
| 682 | descriptor:LstmDescriptor; |
| 683 | inputParams:LstmInputParams; |
| 684 | } |
| 685 | |
| 686 | table QLstmInputParams { |
| 687 | // Mandatory |
| 688 | inputToForgetWeights:ConstTensor; |
| 689 | inputToCellWeights:ConstTensor; |
| 690 | inputToOutputWeights:ConstTensor; |
| 691 | |
| 692 | recurrentToForgetWeights:ConstTensor; |
| 693 | recurrentToCellWeights:ConstTensor; |
| 694 | recurrentToOutputWeights:ConstTensor; |
| 695 | |
| 696 | forgetGateBias:ConstTensor; |
| 697 | cellBias:ConstTensor; |
| 698 | outputGateBias:ConstTensor; |
| 699 | |
| 700 | // CIFG |
| 701 | inputToInputWeights:ConstTensor; |
| 702 | recurrentToInputWeights:ConstTensor; |
| 703 | inputGateBias:ConstTensor; |
| 704 | |
| 705 | // Projection |
| 706 | projectionWeights:ConstTensor; |
| 707 | projectionBias:ConstTensor; |
| 708 | |
| 709 | // Peephole |
| 710 | cellToInputWeights:ConstTensor; |
| 711 | cellToForgetWeights:ConstTensor; |
| 712 | cellToOutputWeights:ConstTensor; |
| 713 | |
| 714 | // Layer norm |
| 715 | inputLayerNormWeights:ConstTensor; |
| 716 | forgetLayerNormWeights:ConstTensor; |
| 717 | cellLayerNormWeights:ConstTensor; |
| 718 | outputLayerNormWeights:ConstTensor; |
| 719 | } |
| 720 | |
| 721 | table QLstmDescriptor { |
| 722 | cifgEnabled:bool = true; |
| 723 | peepholeEnabled:bool = false; |
| 724 | projectionEnabled:bool = false; |
| 725 | layerNormEnabled:bool = false; |
| 726 | |
| 727 | cellClip:float; |
| 728 | projectionClip:float; |
| 729 | |
| 730 | inputIntermediateScale:float; |
| 731 | forgetIntermediateScale:float; |
| 732 | cellIntermediateScale:float; |
| 733 | outputIntermediateScale:float; |
| 734 | |
| 735 | hiddenStateZeroPoint:int; |
| 736 | hiddenStateScale:float; |
| 737 | } |
| 738 | |
| 739 | table QLstmLayer { |
| 740 | base:LayerBase; |
| 741 | descriptor:QLstmDescriptor; |
| 742 | inputParams:QLstmInputParams; |
| 743 | } |
| 744 | |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 745 | table QuantizedLstmInputParams { |
| 746 | inputToInputWeights:ConstTensor; |
| 747 | inputToForgetWeights:ConstTensor; |
| 748 | inputToCellWeights:ConstTensor; |
| 749 | inputToOutputWeights:ConstTensor; |
| 750 | |
| 751 | recurrentToInputWeights:ConstTensor; |
| 752 | recurrentToForgetWeights:ConstTensor; |
| 753 | recurrentToCellWeights:ConstTensor; |
| 754 | recurrentToOutputWeights:ConstTensor; |
| 755 | |
| 756 | inputGateBias:ConstTensor; |
| 757 | forgetGateBias:ConstTensor; |
| 758 | cellBias:ConstTensor; |
| 759 | outputGateBias:ConstTensor; |
| 760 | } |
| 761 | |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 762 | table QuantizedLstmLayer { |
| 763 | base:LayerBase; |
| 764 | inputParams:QuantizedLstmInputParams; |
| 765 | } |
| 766 | |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 767 | table DequantizeLayer { |
| 768 | base:LayerBase; |
| 769 | } |
| 770 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 771 | table MergeLayer { |
| 772 | base:LayerBase; |
| 773 | } |
| 774 | |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 775 | table SwitchLayer { |
| 776 | base:LayerBase; |
| 777 | } |
| 778 | |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 779 | table PreluLayer { |
| 780 | base:LayerBase; |
| 781 | } |
| 782 | |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 783 | table TransposeConvolution2dLayer { |
| 784 | base:LayerBase; |
| 785 | descriptor:TransposeConvolution2dDescriptor; |
| 786 | weights:ConstTensor; |
| 787 | biases:ConstTensor; |
| 788 | } |
| 789 | |
| 790 | table TransposeConvolution2dDescriptor { |
| 791 | padLeft:uint; |
| 792 | padRight:uint; |
| 793 | padTop:uint; |
| 794 | padBottom:uint; |
| 795 | strideX:uint; |
| 796 | strideY:uint; |
| 797 | biasEnabled:bool = false; |
| 798 | dataLayout:DataLayout = NCHW; |
| 799 | } |
| 800 | |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 801 | table TransposeLayer { |
| 802 | base:LayerBase; |
| 803 | descriptor:TransposeDescriptor; |
| 804 | } |
| 805 | |
| 806 | table TransposeDescriptor { |
| 807 | dimMappings:[uint]; |
| 808 | } |
| 809 | |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 810 | table ResizeLayer { |
| 811 | base:LayerBase; |
| 812 | descriptor:ResizeDescriptor; |
| 813 | } |
| 814 | |
| 815 | table ResizeDescriptor { |
| 816 | targetHeight:uint; |
| 817 | targetWidth:uint; |
| 818 | method:ResizeMethod = NearestNeighbor; |
| 819 | dataLayout:DataLayout; |
| 820 | } |
| 821 | |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 822 | table StackLayer { |
| 823 | base:LayerBase; |
| 824 | descriptor:StackDescriptor; |
| 825 | } |
| 826 | |
| 827 | table StackDescriptor { |
| 828 | axis:uint; |
| 829 | numInputs:uint; |
| 830 | inputShape:[uint]; |
| 831 | } |
| 832 | |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 833 | table StandInDescriptor { |
| 834 | numInputs:uint; |
| 835 | numOutputs:uint; |
| 836 | } |
| 837 | |
| 838 | table StandInLayer { |
| 839 | base:LayerBase; |
| 840 | descriptor:StandInDescriptor; |
| 841 | } |
| 842 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 843 | union Layer { |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 844 | ActivationLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 845 | AdditionLayer, |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 846 | BatchToSpaceNdLayer, |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 847 | BatchNormalizationLayer, |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 848 | ConstantLayer, |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 849 | Convolution2dLayer, |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 850 | DepthwiseConvolution2dLayer, |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 851 | FullyConnectedLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 852 | InputLayer, |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 853 | MultiplicationLayer, |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 854 | OutputLayer, |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 855 | PermuteLayer, |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 856 | Pooling2dLayer, |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 857 | ReshapeLayer, |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 858 | SoftmaxLayer, |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 859 | SpaceToBatchNdLayer, |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 860 | DivisionLayer, |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 861 | MinimumLayer, |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 862 | EqualLayer, |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 863 | MaximumLayer, |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 864 | NormalizationLayer, |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 865 | PadLayer, |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 866 | RsqrtLayer, |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 867 | FloorLayer, |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 868 | GreaterLayer, |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 869 | ResizeBilinearLayer, |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 870 | SubtractionLayer, |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 871 | StridedSliceLayer, |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 872 | GatherLayer, |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 873 | MeanLayer, |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 874 | MergerLayer, |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 875 | L2NormalizationLayer, |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 876 | SplitterLayer, |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 877 | DetectionPostProcessLayer, |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 878 | LstmLayer, |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 879 | QuantizedLstmLayer, |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 880 | QuantizeLayer, |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 881 | DequantizeLayer, |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 882 | MergeLayer, |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 883 | SwitchLayer, |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 884 | ConcatLayer, |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 885 | SpaceToDepthLayer, |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 886 | PreluLayer, |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 887 | TransposeConvolution2dLayer, |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 888 | ResizeLayer, |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 889 | StackLayer, |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 890 | AbsLayer, |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 891 | ArgMinMaxLayer, |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 892 | SliceLayer, |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 893 | DepthToSpaceLayer, |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 894 | InstanceNormalizationLayer, |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 895 | LogSoftmaxLayer, |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 896 | ComparisonLayer, |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 897 | StandInLayer, |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 898 | ElementwiseUnaryLayer, |
James Conroy | 8d33318 | 2020-05-13 10:27:58 +0100 | [diff] [blame^] | 899 | TransposeLayer, |
| 900 | QLstmLayer |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 901 | } |
| 902 | |
Saoirse Stewart | 49dbe0e | 2019-02-05 17:27:06 +0000 | [diff] [blame] | 903 | table AnyLayer { |
| 904 | layer:Layer; |
| 905 | } |
| 906 | |
Tee Jung | aa920c5 | 2019-11-05 10:48:25 +0000 | [diff] [blame] | 907 | table FeatureCompatibilityVersions { |
| 908 | bindingIdsScheme:uint = 0; |
| 909 | } |
| 910 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 911 | // Root type for serialized data is the graph of the network |
| 912 | table SerializedGraph { |
Saoirse Stewart | 49dbe0e | 2019-02-05 17:27:06 +0000 | [diff] [blame] | 913 | layers:[AnyLayer]; |
Tee Jung | aa920c5 | 2019-11-05 10:48:25 +0000 | [diff] [blame] | 914 | inputIds:[int]; |
| 915 | outputIds:[int]; |
| 916 | featureVersions:FeatureCompatibilityVersions; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 917 | } |
| 918 | |
| 919 | root_type SerializedGraph; |