blob: 3a01c504a53864ed72ec12e07f80c6da5638a249 [file] [log] [blame]
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001//
Kevin Maye3cc7162024-02-26 09:12:23 +00002// Copyright © 2017,2019-2024 Arm Ltd and Contributors. All rights reserved.
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00003// SPDX-License-Identifier: MIT
4//
5
Derek Lamberti0028d1b2019-02-20 13:57:42 +00006namespace armnnSerializer;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00007
8file_identifier "ARMN";
9
10file_extension "armnn";
11
Mike Kellyaf484012019-02-20 16:53:11 +000012enum 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 Monahan3b3c3812020-02-25 09:03:29 +000022 Square = 9,
Colm Donelan03fbeaf2020-02-26 15:39:23 +000023 Elu = 10,
Teresa Charlin077cddb2023-09-15 15:19:21 +010024 HardSwish = 11,
25 Gelu = 12
Mike Kellyaf484012019-02-20 16:53:11 +000026}
27
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +010028enum ArgMinMaxFunction : byte {
29 Min = 0,
30 Max = 1
31}
32
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000033enum DataType : byte {
34 Float16 = 0,
35 Float32 = 1,
Derek Lambertif90c56d2020-01-10 17:14:08 +000036 QuantisedAsymm8 = 2, // deprecated
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000037 Signed32 = 3,
Nattapat Chaimanowongcd5ac232019-03-19 12:26:36 +000038 Boolean = 4,
Derek Lambertif90c56d2020-01-10 17:14:08 +000039 QuantisedSymm16 = 5, // deprecated
40 QAsymmU8 = 6,
Francis Murtaghddb1d062020-03-10 13:51:45 +000041 QSymmS16 = 7,
Sadik Armagan1a84fe32020-03-27 15:56:57 +000042 QAsymmS8 = 8,
Mike Kelly1f140f72021-04-06 12:25:55 +010043 QSymmS8 = 9,
44 Signed64 = 10
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000045}
46
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000047enum DataLayout : byte {
48 NHWC = 0,
Matthew Sloyanb63a3112021-09-08 13:05:51 +010049 NCHW = 1,
Matthew Sloyan5d7b0a32021-10-18 13:07:49 +010050 NDHWC = 2,
51 NCDHW = 3
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000052}
53
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +000054enum ReduceOperation: byte {
55 Sum = 0,
56 Max = 1,
57 Mean = 2,
Teresa Charlin4e3e8312021-08-05 12:34:37 +010058 Min = 3,
59 Prod = 4
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +000060}
61
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +010062enum ResizeMethod: byte {
63 NearestNeighbor = 0,
64 Bilinear = 1,
65}
66
Kevin Maye3cc7162024-02-26 09:12:23 +000067enum ScatterNdFunction: byte {
68 Update = 0,
69 Add = 1,
70 Sub = 2,
71 Max = 3,
72 Min = 4
73}
74
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000075table TensorInfo {
76 dimensions:[uint];
77 dataType:DataType;
Sadik Armagan1a84fe32020-03-27 15:56:57 +000078 quantizationScale:float = 1.0; // @deprecated Use quantizationScales instead
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000079 quantizationOffset:int = 0;
Sadik Armagan1a84fe32020-03-27 15:56:57 +000080 quantizationScales:[float];
81 quantizationDim:uint;
Finn Williams2605b232020-06-10 15:53:46 +010082 dimensionality:uint = 1;
Colm Donelan800b2812021-02-12 12:43:35 +000083 dimensionSpecificity:[bool];
Matthew Sloyan81beae32021-07-13 19:46:11 +010084 isConstant:bool = false;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000085}
86
87struct Connection {
88 sourceLayerIndex:uint;
89 outputSlotIndex:uint;
90}
91
92table ByteData {
93 data:[byte];
94}
95
96table ShortData {
97 data:[short];
98}
99
100table IntData {
101 data:[int];
102}
103
104table LongData {
105 data:[long];
106}
107
108union ConstTensorData { ByteData, ShortData, IntData, LongData }
109
110table ConstTensor {
111 info:TensorInfo;
112 data:ConstTensorData;
113}
114
115table InputSlot {
116 index:uint;
117 connection:Connection;
Mike Kelly4cc341c2023-07-07 15:43:06 +0100118 isOverridden:bool;
119 overriddenTensorInfo:TensorInfo;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000120}
121
122table OutputSlot {
123 index:uint;
124 tensorInfo:TensorInfo;
125}
126
127enum LayerType : uint {
128 Addition = 0,
129 Input = 1,
Sadik Armagan5f450272019-02-12 14:31:45 +0000130 Multiplication = 2,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000131 Output = 3,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000132 Pooling2d = 4,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000133 Reshape = 5,
Mike Kellya0766c32019-02-19 17:22:07 +0000134 Softmax = 6,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000135 Convolution2d = 7,
Mike Kellyaf484012019-02-20 16:53:11 +0000136 DepthwiseConvolution2d = 8,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000137 Activation = 9,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000138 Permute = 10,
Conor Kennedy76277882019-02-26 08:29:54 +0000139 FullyConnected = 11,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000140 Constant = 12,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000141 SpaceToBatchNd = 13,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000142 BatchToSpaceNd = 14,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000143 Division = 15,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000144 Minimum = 16,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000145 Equal = 17,
Nina Drozd57728782019-02-27 10:53:27 +0000146 Maximum = 18,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000147 Normalization = 19,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000148 Pad = 20,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000149 Rsqrt = 21,
ruoyan018e7fa232019-02-28 15:09:07 +0000150 Floor = 22,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000151 BatchNormalization = 23,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000152 Greater = 24,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000153 ResizeBilinear = 25,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000154 Subtraction = 26,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000155 StridedSlice = 27,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000156 Gather = 28,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000157 Mean = 29,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000158 Merger = 30,
Jim Flynn18ce3382019-03-08 11:08:30 +0000159 L2Normalization = 31,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000160 Splitter = 32,
Jim Flynn11af3752019-03-19 17:22:29 +0000161 DetectionPostProcess = 33,
Derek Lamberti87acb272019-03-27 16:51:31 +0000162 Lstm = 34,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000163 Quantize = 35,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100164 Dequantize = 36,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100165 Merge = 37,
Jim Flynne242f2d2019-05-22 14:24:13 +0100166 Switch = 38,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100167 Concat = 39,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100168 SpaceToDepth = 40,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100169 Prelu = 41,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100170 TransposeConvolution2d = 42,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100171 Resize = 43,
Jan Eilers5b01a892019-07-23 09:47:43 +0100172 Stack = 44,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100173 QuantizedLstm = 45,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100174 Abs = 46,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100175 ArgMinMax = 47,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100176 Slice = 48,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100177 DepthToSpace = 49,
Sadik Armagan26257852019-10-14 13:00:47 +0100178 InstanceNormalization = 50,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100179 LogSoftmax = 51,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +0100180 Comparison = 52,
josh minor4a3c6102020-01-06 16:40:46 -0600181 StandIn = 53,
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000182 ElementwiseUnary = 54,
James Conroy8d333182020-05-13 10:27:58 +0100183 Transpose = 55,
Keith Davis300ad562020-06-04 16:34:23 +0100184 QLstm = 56,
Finn Williams2605b232020-06-10 15:53:46 +0100185 Fill = 57,
James Conroyaba90cd2020-11-06 16:28:18 +0000186 Rank = 58,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +0000187 LogicalBinary = 59,
mathad01b392e982021-04-07 12:07:30 +0100188 Reduce = 60,
Keith Davis3ae3f972021-05-21 16:33:48 +0100189 Cast = 61,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +0100190 Shape = 62,
191 UnidirectionalSequenceLstm = 63,
Simon Obute51f67772021-09-03 15:50:13 +0100192 ChannelShuffle = 64,
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100193 Convolution3d = 65,
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000194 Pooling3d = 66,
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100195 GatherNd = 67,
Samuel Yapa04f4a12022-08-19 11:14:38 +0100196 BatchMatMul = 68,
Mike Kelly3ec30772023-03-08 13:47:17 +0000197 ElementwiseBinary = 69,
Tracy Narine944fb502023-07-04 15:08:57 +0100198 ReverseV2 = 70,
David Monahan616b22f2023-07-25 12:08:10 +0100199 Tile = 71,
Kevin Maye3cc7162024-02-26 09:12:23 +0000200 ScatterNd = 72,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000201}
202
203// Base layer table to be used as part of other layers
204table LayerBase {
205 index:uint;
206 layerName:string;
207 layerType:LayerType;
208 inputSlots:[InputSlot];
209 outputSlots:[OutputSlot];
210}
211
212table BindableLayerBase {
213 base:LayerBase;
214 layerBindingId:int;
215}
216
217// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100218
josh minor4a3c6102020-01-06 16:40:46 -0600219/// @deprecated Use ElementwiseUnaryLayer instead
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100220table AbsLayer {
221 base:LayerBase;
222}
223
Mike Kellyaf484012019-02-20 16:53:11 +0000224table ActivationLayer {
225 base:LayerBase;
226 descriptor:ActivationDescriptor;
227}
228
229table ActivationDescriptor {
Tee Jung86bc3d82019-10-01 11:25:56 +0900230 activationFunction:ActivationFunction = Sigmoid;
Mike Kellyaf484012019-02-20 16:53:11 +0000231 a:float;
232 b:float;
233}
234
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000235table AdditionLayer {
236 base:LayerBase;
237}
238
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100239table ArgMinMaxLayer {
240 base:LayerBase;
241 descriptor:ArgMinMaxDescriptor;
242}
243
244table ArgMinMaxDescriptor{
Tee Jung86bc3d82019-10-01 11:25:56 +0900245 argMinMaxFunction:ArgMinMaxFunction;
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100246 axis:int;
247}
248
mathad01b392e982021-04-07 12:07:30 +0100249table CastLayer {
250 base:LayerBase;
251}
252
Simon Obute51f67772021-09-03 15:50:13 +0100253table ChannelShuffleLayer {
254 base:LayerBase;
255 descriptor:ChannelShuffleDescriptor;
256}
257
258table ChannelShuffleDescriptor {
259 axis:uint = 0;
260 numGroups:uint = 0;
261}
262
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100263enum ComparisonOperation : byte {
264 Equal = 0,
265 Greater = 1,
266 GreaterOrEqual = 2,
267 Less = 3,
268 LessOrEqual = 4,
269 NotEqual = 5
270}
271
272table ComparisonDescriptor {
273 operation:ComparisonOperation;
274}
275
276table ComparisonLayer {
277 base:LayerBase;
278 descriptor:ComparisonDescriptor;
279}
280
Conor Kennedy76277882019-02-26 08:29:54 +0000281table ConstantLayer {
282 base:LayerBase;
283 input:ConstTensor;
284}
285
Mike Kellya0766c32019-02-19 17:22:07 +0000286table Convolution2dLayer {
287 base:LayerBase;
288 descriptor:Convolution2dDescriptor;
289 weights:ConstTensor;
290 biases:ConstTensor;
291}
292
293table Convolution2dDescriptor {
294 padLeft:uint;
295 padRight:uint;
296 padTop:uint;
297 padBottom:uint;
298 strideX:uint;
299 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100300 dilationX:uint = 1;
301 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000302 biasEnabled:bool = false;
303 dataLayout:DataLayout = NCHW;
304}
305
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100306table Convolution3dLayer {
307 base:LayerBase;
308 descriptor:Convolution3dDescriptor;
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100309}
310
311table Convolution3dDescriptor {
312 padLeft:uint;
313 padRight:uint;
314 padTop:uint;
315 padBottom:uint;
316 padFront:uint;
317 padBack:uint;
318 strideX:uint;
319 strideY:uint;
320 strideZ:uint;
321 dilationX:uint = 1;
322 dilationY:uint = 1;
323 dilationZ:uint = 1;
324 biasEnabled:bool = false;
325 dataLayout:DataLayout = NDHWC;
326}
327
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100328table DepthToSpaceLayer {
329 base:LayerBase;
330 descriptor:DepthToSpaceDescriptor;
331}
332
333table DepthToSpaceDescriptor {
334 blockSize:uint;
335 dataLayout:DataLayout;
336}
337
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000338table DivisionLayer {
339 base:LayerBase;
340}
341
Mike Kelly3ec30772023-03-08 13:47:17 +0000342enum BinaryOperation : byte {
343 Add = 0,
344 Div = 1,
345 Maximum = 2,
346 Minimum = 3,
347 Mul = 4,
John Mcloughlin0ec00872023-05-15 17:03:49 +0100348 Sub = 5,
349 SqDiff = 6,
350 Power = 7
Mike Kelly3ec30772023-03-08 13:47:17 +0000351}
352
353table ElementwiseBinaryDescriptor {
354 operation:BinaryOperation;
355}
356
357table ElementwiseBinaryLayer {
358 base:LayerBase;
359 descriptor:ElementwiseBinaryDescriptor;
360}
361
josh minor4a3c6102020-01-06 16:40:46 -0600362enum UnaryOperation : byte {
363 Abs = 0,
364 Rsqrt = 1,
365 Sqrt = 2,
366 Exp = 3,
James Conroyaba90cd2020-11-06 16:28:18 +0000367 Neg = 4,
Teresa Charlin50de4fa2021-05-31 18:47:33 +0100368 LogicalNot = 5,
369 Log = 6,
Teresa Charlin93f0ad02023-03-23 15:28:02 +0000370 Sin = 7,
371 Ceil = 8
josh minor4a3c6102020-01-06 16:40:46 -0600372}
373
374table ElementwiseUnaryDescriptor {
375 operation:UnaryOperation;
376}
377
378table ElementwiseUnaryLayer {
379 base:LayerBase;
380 descriptor:ElementwiseUnaryDescriptor;
381}
382
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100383/// @deprecated Use ComparisonLayer instead
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000384table EqualLayer {
385 base:LayerBase;
386}
387
Keith Davis300ad562020-06-04 16:34:23 +0100388table FillLayer {
389 base:LayerBase;
390 descriptor:FillDescriptor;
391}
392
393table FillDescriptor {
394 value:float;
395}
396
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000397table FloorLayer{
398 base:LayerBase;
399}
400
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000401table FullyConnectedLayer {
402 base:LayerBase;
403 descriptor:FullyConnectedDescriptor;
Matthew Sloyan81beae32021-07-13 19:46:11 +0100404 weights:ConstTensor; // ConstTensors are now passed as inputs.
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000405 biases:ConstTensor;
406}
407
408table FullyConnectedDescriptor {
409 biasEnabled:bool = false;
410 transposeWeightsMatrix:bool = false;
Sadik Armaganf0a6dec2021-03-25 07:46:55 +0000411 constantWeights:bool = true;
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000412}
413
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000414table GatherLayer {
415 base:LayerBase;
Teresa Charlin52664732020-06-29 16:27:03 +0100416 descriptor:GatherDescriptor;
417}
418
419table GatherDescriptor {
420 axis:int = 0;
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000421}
422
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100423table GatherNdLayer {
424 base:LayerBase;
425}
426
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100427/// @deprecated Use ComparisonLayer instead
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000428table GreaterLayer {
429 base:LayerBase;
430}
431
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000432table InputLayer {
433 base:BindableLayerBase;
434}
435
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100436table InstanceNormalizationLayer {
437 base:LayerBase;
438 descriptor:InstanceNormalizationDescriptor;
439}
440
441table InstanceNormalizationDescriptor {
442 gamma:float;
443 beta:float;
444 eps:float;
445 dataLayout:DataLayout;
446}
447
Sadik Armagan26257852019-10-14 13:00:47 +0100448table LogSoftmaxLayer {
449 base:LayerBase;
450 descriptor:LogSoftmaxDescriptor;
451}
452
453table LogSoftmaxDescriptor {
454 beta:float = 1;
455 axis:int = -1;
456}
457
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000458table L2NormalizationLayer {
459 base:LayerBase;
460 descriptor:L2NormalizationDescriptor;
461}
462
463table L2NormalizationDescriptor {
464 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100465 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000466}
467
James Conroyaba90cd2020-11-06 16:28:18 +0000468enum LogicalBinaryOperation : byte {
469 LogicalAnd = 0,
470 LogicalOr = 1
471}
472
473table LogicalBinaryDescriptor {
474 operation:LogicalBinaryOperation;
475}
476
477table LogicalBinaryLayer {
478 base:LayerBase;
479 descriptor:LogicalBinaryDescriptor;
480}
481
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000482table MinimumLayer {
483 base:LayerBase;
484}
485
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000486table MaximumLayer {
487 base:LayerBase;
488}
489
Sadik Armagan5f450272019-02-12 14:31:45 +0000490table MultiplicationLayer {
491 base:LayerBase;
492}
493
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000494table Pooling2dLayer {
495 base:LayerBase;
496 descriptor:Pooling2dDescriptor;
497}
498
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000499table Pooling3dLayer {
500 base:LayerBase;
501 descriptor:Pooling3dDescriptor;
502}
503
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000504enum PoolingAlgorithm : byte {
505 Max = 0,
506 Average = 1,
507 L2 = 2
508}
509
510enum OutputShapeRounding : byte {
511 Floor = 0,
512 Ceiling = 1
513}
514
515enum PaddingMethod : byte {
516 IgnoreValue = 0,
517 Exclude = 1
518}
519
520table Pooling2dDescriptor {
521 poolType:PoolingAlgorithm;
522 padLeft:uint;
523 padRight:uint;
524 padTop:uint;
525 padBottom:uint;
526 poolWidth:uint;
527 poolHeight:uint;
528 strideX:uint;
529 strideY:uint;
530 outputShapeRounding:OutputShapeRounding;
531 paddingMethod:PaddingMethod;
532 dataLayout:DataLayout;
533}
534
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000535table Pooling3dDescriptor {
536 poolType:PoolingAlgorithm;
537 padLeft:uint;
538 padRight:uint;
539 padTop:uint;
540 padBottom:uint;
541 padFront:uint;
542 padBack:uint;
543 poolWidth:uint;
544 poolHeight:uint;
545 poolDepth:uint;
546 strideX:uint;
547 strideY:uint;
548 strideZ:uint;
549 outputShapeRounding:OutputShapeRounding;
550 paddingMethod:PaddingMethod;
551 dataLayout:DataLayout;
552}
553
Derek Lamberti87acb272019-03-27 16:51:31 +0000554table QuantizeLayer {
555 base:LayerBase;
556}
557
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000558table SoftmaxLayer {
559 base:LayerBase;
560 descriptor:SoftmaxDescriptor;
561}
562
563table SoftmaxDescriptor {
564 beta:float;
Sadik Armaganfd0cae32021-11-08 17:18:31 +0000565 axis:int = -1;
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000566}
567
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000568table DepthwiseConvolution2dLayer {
569 base:LayerBase;
570 descriptor:DepthwiseConvolution2dDescriptor;
571 weights:ConstTensor;
572 biases:ConstTensor;
573}
574
575table DepthwiseConvolution2dDescriptor {
576 padLeft:uint;
577 padRight:uint;
578 padTop:uint;
579 padBottom:uint;
580 strideX:uint;
581 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100582 dilationX:uint = 1;
583 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000584 biasEnabled:bool = false;
585 dataLayout:DataLayout = NCHW;
586}
587
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000588table OutputLayer {
589 base:BindableLayerBase;
590}
591
Saoirse Stewart263829c2019-02-19 15:54:14 +0000592table ReshapeLayer {
593 base:LayerBase;
594 descriptor:ReshapeDescriptor;
595}
596
597table ReshapeDescriptor {
Keith Davis3ae3f972021-05-21 16:33:48 +0100598 targetShape:[uint];
Saoirse Stewart263829c2019-02-19 15:54:14 +0000599}
600
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000601table PermuteLayer {
602 base:LayerBase;
603 descriptor:PermuteDescriptor;
604}
605
606table PermuteDescriptor {
607 dimMappings:[uint];
608}
609
Keith Davis3ae3f972021-05-21 16:33:48 +0100610table ShapeLayer {
611 base:LayerBase;
612}
613
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000614table SpaceToBatchNdLayer {
615 base:LayerBase;
616 descriptor:SpaceToBatchNdDescriptor;
617}
618
619table SpaceToBatchNdDescriptor {
620 blockShape:[uint];
621 padList:[uint];
622 dataLayout:DataLayout;
623}
624
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100625table SpaceToDepthLayer {
626 base:LayerBase;
627 descriptor:SpaceToDepthDescriptor;
628}
629
630table SpaceToDepthDescriptor {
631 blockSize:uint;
632 dataLayout:DataLayout;
633}
634
Conor Kennedyda1f9752019-03-01 14:37:12 +0000635table SubtractionLayer {
636 base:LayerBase;
637}
638
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000639table BatchToSpaceNdLayer {
640 base:LayerBase;
641 descriptor:BatchToSpaceNdDescriptor;
642}
643
644table BatchToSpaceNdDescriptor {
645 blockShape:[uint];
646 crops:[uint];
647 dataLayout:DataLayout;
648}
649
Nina Drozd57728782019-02-27 10:53:27 +0000650enum NormalizationAlgorithmChannel : byte {
651 Across = 0,
652 Within = 1
653}
654
655enum NormalizationAlgorithmMethod : byte {
656 LocalBrightness = 0,
657 LocalContrast = 1
658}
659
660table NormalizationLayer {
661 base:LayerBase;
662 descriptor:NormalizationDescriptor;
663}
664
665table NormalizationDescriptor {
666 normChannelType:NormalizationAlgorithmChannel = Across;
667 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
668 normSize:uint;
669 alpha:float;
670 beta:float;
671 k:float;
672 dataLayout:DataLayout = NCHW;
673}
674
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000675table MeanLayer {
676 base:LayerBase;
677 descriptor:MeanDescriptor;
678}
679
680table MeanDescriptor {
681 axis:[uint];
682 keepDims:bool = false;
683}
684
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000685table PadLayer {
686 base:LayerBase;
687 descriptor:PadDescriptor;
688}
689
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100690enum PaddingMode : byte {
691 Constant = 0,
692 Reflect = 1,
693 Symmetric = 2
694}
695
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000696table PadDescriptor {
697 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100698 padValue:float = 0;
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100699 paddingMode:PaddingMode = Constant;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000700}
701
josh minor4a3c6102020-01-06 16:40:46 -0600702/// @deprecated Use ElementwiseUnaryLayer instead
Sadik Armagan8b42a382019-03-01 14:24:49 +0000703table RsqrtLayer {
704 base:LayerBase;
705}
706
ruoyan018e7fa232019-02-28 15:09:07 +0000707table BatchNormalizationLayer {
708 base:LayerBase;
709 descriptor:BatchNormalizationDescriptor;
710 mean:ConstTensor;
711 variance:ConstTensor;
712 beta:ConstTensor;
713 gamma:ConstTensor;
714}
715
716table BatchNormalizationDescriptor {
717 eps:float;
718 dataLayout:DataLayout;
719}
720
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100721/// @deprecated Use ResizeLayer instead
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000722table ResizeBilinearLayer {
723 base:LayerBase;
724 descriptor:ResizeBilinearDescriptor;
725}
726
727table ResizeBilinearDescriptor {
728 targetWidth:uint;
729 targetHeight:uint;
730 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100731 alignCorners:bool;
732 halfPixelCenters:bool;
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000733}
734
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100735table SliceLayer {
736 base:LayerBase;
737 descriptor:SliceDescriptor;
738}
739
740table SliceDescriptor {
741 begin:[uint];
742 size:[uint];
743}
744
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000745table StridedSliceLayer {
746 base:LayerBase;
747 descriptor:StridedSliceDescriptor;
748}
749
750table StridedSliceDescriptor {
751 begin:[int];
752 end:[int];
753 stride:[int];
754 beginMask:int;
755 endMask:int;
756 shrinkAxisMask:int;
757 ellipsisMask:int;
758 newAxisMask:int;
759 dataLayout:DataLayout;
760}
761
Jim Flynne242f2d2019-05-22 14:24:13 +0100762table ConcatLayer {
763 base:LayerBase;
764 descriptor:OriginsDescriptor;
765}
766
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100767/// @deprecated Use ConcatLayer instead
Jim Flynnac25a1b2019-02-28 10:40:49 +0000768table MergerLayer {
769 base:LayerBase;
770 descriptor:OriginsDescriptor;
771}
772
773table UintVector {
774 data:[uint];
775}
776
777table OriginsDescriptor {
778 concatAxis:uint;
779 numViews:uint;
780 numDimensions:uint;
781 viewOrigins:[UintVector];
782}
783
Jim Flynn18ce3382019-03-08 11:08:30 +0000784table ViewsDescriptor {
785 origins:OriginsDescriptor;
786 viewSizes:[UintVector];
Mike Kellyfca59162023-08-08 12:00:28 +0100787 hasAxis:bool;
788 axis:int;
Jim Flynn18ce3382019-03-08 11:08:30 +0000789}
790
791table SplitterLayer {
792 base:LayerBase;
793 descriptor:ViewsDescriptor;
794}
795
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000796table DetectionPostProcessLayer {
797 base:LayerBase;
798 descriptor:DetectionPostProcessDescriptor;
799 anchors:ConstTensor;
800}
801
802table DetectionPostProcessDescriptor {
803 maxDetections:uint;
804 maxClassesPerDetection:uint;
805 detectionsPerClass:uint;
806 nmsScoreThreshold:float;
807 nmsIouThreshold:float;
808 numClasses:uint;
809 useRegularNms:bool;
810 scaleX:float;
811 scaleY:float;
812 scaleW:float;
813 scaleH:float;
814}
815
Jim Flynn11af3752019-03-19 17:22:29 +0000816table LstmInputParams {
817 inputToForgetWeights:ConstTensor;
818 inputToCellWeights:ConstTensor;
819 inputToOutputWeights:ConstTensor;
820 recurrentToForgetWeights:ConstTensor;
821 recurrentToCellWeights:ConstTensor;
822 recurrentToOutputWeights:ConstTensor;
823 forgetGateBias:ConstTensor;
824 cellBias:ConstTensor;
825 outputGateBias:ConstTensor;
826
827 inputToInputWeights:ConstTensor;
828 recurrentToInputWeights:ConstTensor;
829 cellToInputWeights:ConstTensor;
830 inputGateBias:ConstTensor;
831
832 projectionWeights:ConstTensor;
833 projectionBias:ConstTensor;
834
835 cellToForgetWeights:ConstTensor;
836 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100837
838 inputLayerNormWeights:ConstTensor;
839 forgetLayerNormWeights:ConstTensor;
840 cellLayerNormWeights:ConstTensor;
841 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000842}
843
James Conroy8d333182020-05-13 10:27:58 +0100844table LstmDescriptor {
845 activationFunc:uint;
846 clippingThresCell:float;
847 clippingThresProj:float;
848 cifgEnabled:bool = true;
849 peepholeEnabled:bool = false;
850 projectionEnabled:bool = false;
851 layerNormEnabled:bool = false;
852}
853
854table LstmLayer {
855 base:LayerBase;
856 descriptor:LstmDescriptor;
857 inputParams:LstmInputParams;
858}
859
860table QLstmInputParams {
861 // Mandatory
862 inputToForgetWeights:ConstTensor;
863 inputToCellWeights:ConstTensor;
864 inputToOutputWeights:ConstTensor;
865
866 recurrentToForgetWeights:ConstTensor;
867 recurrentToCellWeights:ConstTensor;
868 recurrentToOutputWeights:ConstTensor;
869
870 forgetGateBias:ConstTensor;
871 cellBias:ConstTensor;
872 outputGateBias:ConstTensor;
873
874 // CIFG
875 inputToInputWeights:ConstTensor;
876 recurrentToInputWeights:ConstTensor;
877 inputGateBias:ConstTensor;
878
879 // Projection
880 projectionWeights:ConstTensor;
881 projectionBias:ConstTensor;
882
883 // Peephole
884 cellToInputWeights:ConstTensor;
885 cellToForgetWeights:ConstTensor;
886 cellToOutputWeights:ConstTensor;
887
888 // Layer norm
889 inputLayerNormWeights:ConstTensor;
890 forgetLayerNormWeights:ConstTensor;
891 cellLayerNormWeights:ConstTensor;
892 outputLayerNormWeights:ConstTensor;
893}
894
895table QLstmDescriptor {
896 cifgEnabled:bool = true;
897 peepholeEnabled:bool = false;
898 projectionEnabled:bool = false;
899 layerNormEnabled:bool = false;
900
901 cellClip:float;
902 projectionClip:float;
903
904 inputIntermediateScale:float;
905 forgetIntermediateScale:float;
906 cellIntermediateScale:float;
907 outputIntermediateScale:float;
908
909 hiddenStateZeroPoint:int;
910 hiddenStateScale:float;
911}
912
913table QLstmLayer {
914 base:LayerBase;
915 descriptor:QLstmDescriptor;
916 inputParams:QLstmInputParams;
917}
918
Jan Eilers5b01a892019-07-23 09:47:43 +0100919table QuantizedLstmInputParams {
920 inputToInputWeights:ConstTensor;
921 inputToForgetWeights:ConstTensor;
922 inputToCellWeights:ConstTensor;
923 inputToOutputWeights:ConstTensor;
924
925 recurrentToInputWeights:ConstTensor;
926 recurrentToForgetWeights:ConstTensor;
927 recurrentToCellWeights:ConstTensor;
928 recurrentToOutputWeights:ConstTensor;
929
930 inputGateBias:ConstTensor;
931 forgetGateBias:ConstTensor;
932 cellBias:ConstTensor;
933 outputGateBias:ConstTensor;
934}
935
Jan Eilers5b01a892019-07-23 09:47:43 +0100936table QuantizedLstmLayer {
937 base:LayerBase;
938 inputParams:QuantizedLstmInputParams;
939}
940
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000941table DequantizeLayer {
942 base:LayerBase;
943}
944
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100945table MergeLayer {
946 base:LayerBase;
947}
948
Sadik Armaganeff363d2019-04-05 15:25:46 +0100949table SwitchLayer {
950 base:LayerBase;
951}
952
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100953table PreluLayer {
954 base:LayerBase;
955}
956
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100957table TransposeConvolution2dLayer {
958 base:LayerBase;
959 descriptor:TransposeConvolution2dDescriptor;
960 weights:ConstTensor;
961 biases:ConstTensor;
962}
963
964table TransposeConvolution2dDescriptor {
965 padLeft:uint;
966 padRight:uint;
967 padTop:uint;
968 padBottom:uint;
969 strideX:uint;
970 strideY:uint;
971 biasEnabled:bool = false;
972 dataLayout:DataLayout = NCHW;
973}
974
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000975table TransposeLayer {
976 base:LayerBase;
977 descriptor:TransposeDescriptor;
978}
979
980table TransposeDescriptor {
981 dimMappings:[uint];
982}
983
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100984table ResizeLayer {
985 base:LayerBase;
986 descriptor:ResizeDescriptor;
987}
988
989table ResizeDescriptor {
990 targetHeight:uint;
991 targetWidth:uint;
992 method:ResizeMethod = NearestNeighbor;
993 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100994 alignCorners:bool;
995 halfPixelCenters:bool;
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100996}
997
Tracy Narine944fb502023-07-04 15:08:57 +0100998table ReverseV2Layer {
999 base:LayerBase;
Tracy Narine944fb502023-07-04 15:08:57 +01001000}
1001
Matthew Jacksonb5433ee2019-07-11 15:54:20 +01001002table StackLayer {
1003 base:LayerBase;
1004 descriptor:StackDescriptor;
1005}
1006
1007table StackDescriptor {
1008 axis:uint;
1009 numInputs:uint;
1010 inputShape:[uint];
1011}
1012
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001013table StandInDescriptor {
1014 numInputs:uint;
1015 numOutputs:uint;
1016}
1017
1018table StandInLayer {
1019 base:LayerBase;
1020 descriptor:StandInDescriptor;
1021}
1022
Finn Williams2605b232020-06-10 15:53:46 +01001023table RankLayer {
1024 base:LayerBase;
1025}
1026
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001027table ReduceLayer {
1028 base:LayerBase;
1029 descriptor:ReduceDescriptor;
1030}
1031
1032table ReduceDescriptor {
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001033 keepDims:bool = false;
1034 axis:[uint];
1035 reduceOperation:ReduceOperation = Sum;
1036}
1037
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001038table UnidirectionalSequenceLstmDescriptor {
1039 activationFunc:uint;
1040 clippingThresCell:float;
1041 clippingThresProj:float;
1042 cifgEnabled:bool = true;
1043 peepholeEnabled:bool = false;
1044 projectionEnabled:bool = false;
1045 layerNormEnabled:bool = false;
1046 timeMajor:bool = false;
1047}
1048
1049table UnidirectionalSequenceLstmLayer {
1050 base:LayerBase;
1051 descriptor:UnidirectionalSequenceLstmDescriptor;
1052 inputParams:LstmInputParams;
1053}
1054
Samuel Yapa04f4a12022-08-19 11:14:38 +01001055table BatchMatMulDescriptor {
1056 transposeX:bool = false;
1057 transposeY:bool = false;
1058 adjointX:bool = false;
1059 adjointY:bool = false;
1060 dataLayoutX:DataLayout = NCHW;
1061 dataLayoutY:DataLayout = NCHW;
1062}
1063
1064table BatchMatMulLayer {
1065 base:LayerBase;
1066 descriptor:BatchMatMulDescriptor;
1067}
1068
David Monahan616b22f2023-07-25 12:08:10 +01001069table TileDescriptor {
1070 m_Multiples:[uint];
1071}
1072
1073table TileLayer {
1074 base:LayerBase;
1075 descriptor:TileDescriptor;
1076}
1077
Kevin Maye3cc7162024-02-26 09:12:23 +00001078table ScatterNdDescriptor {
1079 m_Function:ScatterNdFunction = Update;
1080 m_InputEnabled:bool = true;
1081 m_Axis:int = 0;
1082 m_AxisEnabled:bool = false;
1083}
1084
1085table ScatterNdLayer {
1086 base:LayerBase;
1087 descriptor:ScatterNdDescriptor;
1088}
1089
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001090union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +00001091 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001092 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +00001093 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +00001094 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +00001095 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +00001096 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +00001097 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +00001098 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001099 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +00001100 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +00001101 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +00001102 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +00001103 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +00001104 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +00001105 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +00001106 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +00001107 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +00001108 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +00001109 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +00001110 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +00001111 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +00001112 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +00001113 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +00001114 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +00001115 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +00001116 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +00001117 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +00001118 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +00001119 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +00001120 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +00001121 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +00001122 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +00001123 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +00001124 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +00001125 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +01001126 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +00001127 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +01001128 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +01001129 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +01001130 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +01001131 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +01001132 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +01001133 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +01001134 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +01001135 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +01001136 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +01001137 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +01001138 ArgMinMaxLayer,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +01001139 SliceLayer,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +01001140 DepthToSpaceLayer,
Sadik Armagan26257852019-10-14 13:00:47 +01001141 InstanceNormalizationLayer,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +01001142 LogSoftmaxLayer,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001143 ComparisonLayer,
josh minor4a3c6102020-01-06 16:40:46 -06001144 StandInLayer,
Mike Kellyc9ea45a2020-02-28 18:11:58 +00001145 ElementwiseUnaryLayer,
James Conroy8d333182020-05-13 10:27:58 +01001146 TransposeLayer,
Keith Davis300ad562020-06-04 16:34:23 +01001147 QLstmLayer,
Finn Williams2605b232020-06-10 15:53:46 +01001148 FillLayer,
James Conroyaba90cd2020-11-06 16:28:18 +00001149 RankLayer,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001150 LogicalBinaryLayer,
mathad01b392e982021-04-07 12:07:30 +01001151 ReduceLayer,
Keith Davis3ae3f972021-05-21 16:33:48 +01001152 CastLayer,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001153 ShapeLayer,
1154 UnidirectionalSequenceLstmLayer,
Simon Obute51f67772021-09-03 15:50:13 +01001155 ChannelShuffleLayer,
Matthew Sloyanb63a3112021-09-08 13:05:51 +01001156 Convolution3dLayer,
Tamas Nyirid998a1c2021-11-05 14:55:33 +00001157 Pooling3dLayer,
Teresa Charlin6966bfa2022-04-25 17:14:50 +01001158 GatherNdLayer,
Samuel Yapa04f4a12022-08-19 11:14:38 +01001159 BatchMatMulLayer,
Mike Kelly3ec30772023-03-08 13:47:17 +00001160 ElementwiseBinaryLayer,
Tracy Narine944fb502023-07-04 15:08:57 +01001161 ReverseV2Layer,
David Monahan616b22f2023-07-25 12:08:10 +01001162 TileLayer,
Kevin Maye3cc7162024-02-26 09:12:23 +00001163 ScatterNdLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001164}
1165
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001166table AnyLayer {
1167 layer:Layer;
1168}
1169
Tee Jungaa920c52019-11-05 10:48:25 +00001170table FeatureCompatibilityVersions {
1171 bindingIdsScheme:uint = 0;
Jan Eilers53ef7952021-06-02 12:01:25 +01001172 weightsLayoutScheme:uint = 0;
Matthew Sloyan81beae32021-07-13 19:46:11 +01001173 constantTensorsAsInputs:uint = 0;
Tee Jungaa920c52019-11-05 10:48:25 +00001174}
1175
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001176// Root type for serialized data is the graph of the network
1177table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001178 layers:[AnyLayer];
Tee Jungaa920c52019-11-05 10:48:25 +00001179 inputIds:[int];
1180 outputIds:[int];
1181 featureVersions:FeatureCompatibilityVersions;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001182}
1183
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001184root_type SerializedGraph;