blob: ec4b48639d8db1d62e110be86c04a215d93ad2f6 [file] [log] [blame]
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001//
Mike Kelly3ec30772023-03-08 13:47:17 +00002// Copyright © 2017,2019-2023 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,
24 HardSwish = 11
Mike Kellyaf484012019-02-20 16:53:11 +000025}
26
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +010027enum ArgMinMaxFunction : byte {
28 Min = 0,
29 Max = 1
30}
31
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000032enum DataType : byte {
33 Float16 = 0,
34 Float32 = 1,
Derek Lambertif90c56d2020-01-10 17:14:08 +000035 QuantisedAsymm8 = 2, // deprecated
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000036 Signed32 = 3,
Nattapat Chaimanowongcd5ac232019-03-19 12:26:36 +000037 Boolean = 4,
Derek Lambertif90c56d2020-01-10 17:14:08 +000038 QuantisedSymm16 = 5, // deprecated
39 QAsymmU8 = 6,
Francis Murtaghddb1d062020-03-10 13:51:45 +000040 QSymmS16 = 7,
Sadik Armagan1a84fe32020-03-27 15:56:57 +000041 QAsymmS8 = 8,
Mike Kelly1f140f72021-04-06 12:25:55 +010042 QSymmS8 = 9,
43 Signed64 = 10
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000044}
45
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000046enum DataLayout : byte {
47 NHWC = 0,
Matthew Sloyanb63a3112021-09-08 13:05:51 +010048 NCHW = 1,
Matthew Sloyan5d7b0a32021-10-18 13:07:49 +010049 NDHWC = 2,
50 NCDHW = 3
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000051}
52
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +000053enum ReduceOperation: byte {
54 Sum = 0,
55 Max = 1,
56 Mean = 2,
Teresa Charlin4e3e8312021-08-05 12:34:37 +010057 Min = 3,
58 Prod = 4
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +000059}
60
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +010061enum ResizeMethod: byte {
62 NearestNeighbor = 0,
63 Bilinear = 1,
64}
65
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000066table TensorInfo {
67 dimensions:[uint];
68 dataType:DataType;
Sadik Armagan1a84fe32020-03-27 15:56:57 +000069 quantizationScale:float = 1.0; // @deprecated Use quantizationScales instead
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000070 quantizationOffset:int = 0;
Sadik Armagan1a84fe32020-03-27 15:56:57 +000071 quantizationScales:[float];
72 quantizationDim:uint;
Finn Williams2605b232020-06-10 15:53:46 +010073 dimensionality:uint = 1;
Colm Donelan800b2812021-02-12 12:43:35 +000074 dimensionSpecificity:[bool];
Matthew Sloyan81beae32021-07-13 19:46:11 +010075 isConstant:bool = false;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000076}
77
78struct Connection {
79 sourceLayerIndex:uint;
80 outputSlotIndex:uint;
81}
82
83table ByteData {
84 data:[byte];
85}
86
87table ShortData {
88 data:[short];
89}
90
91table IntData {
92 data:[int];
93}
94
95table LongData {
96 data:[long];
97}
98
99union ConstTensorData { ByteData, ShortData, IntData, LongData }
100
101table ConstTensor {
102 info:TensorInfo;
103 data:ConstTensorData;
104}
105
106table InputSlot {
107 index:uint;
108 connection:Connection;
Mike Kelly4cc341c2023-07-07 15:43:06 +0100109 isOverridden:bool;
110 overriddenTensorInfo:TensorInfo;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000111}
112
113table OutputSlot {
114 index:uint;
115 tensorInfo:TensorInfo;
116}
117
118enum LayerType : uint {
119 Addition = 0,
120 Input = 1,
Sadik Armagan5f450272019-02-12 14:31:45 +0000121 Multiplication = 2,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000122 Output = 3,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000123 Pooling2d = 4,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000124 Reshape = 5,
Mike Kellya0766c32019-02-19 17:22:07 +0000125 Softmax = 6,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000126 Convolution2d = 7,
Mike Kellyaf484012019-02-20 16:53:11 +0000127 DepthwiseConvolution2d = 8,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000128 Activation = 9,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000129 Permute = 10,
Conor Kennedy76277882019-02-26 08:29:54 +0000130 FullyConnected = 11,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000131 Constant = 12,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000132 SpaceToBatchNd = 13,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000133 BatchToSpaceNd = 14,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000134 Division = 15,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000135 Minimum = 16,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000136 Equal = 17,
Nina Drozd57728782019-02-27 10:53:27 +0000137 Maximum = 18,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000138 Normalization = 19,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000139 Pad = 20,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000140 Rsqrt = 21,
ruoyan018e7fa232019-02-28 15:09:07 +0000141 Floor = 22,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000142 BatchNormalization = 23,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000143 Greater = 24,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000144 ResizeBilinear = 25,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000145 Subtraction = 26,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000146 StridedSlice = 27,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000147 Gather = 28,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000148 Mean = 29,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000149 Merger = 30,
Jim Flynn18ce3382019-03-08 11:08:30 +0000150 L2Normalization = 31,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000151 Splitter = 32,
Jim Flynn11af3752019-03-19 17:22:29 +0000152 DetectionPostProcess = 33,
Derek Lamberti87acb272019-03-27 16:51:31 +0000153 Lstm = 34,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000154 Quantize = 35,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100155 Dequantize = 36,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100156 Merge = 37,
Jim Flynne242f2d2019-05-22 14:24:13 +0100157 Switch = 38,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100158 Concat = 39,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100159 SpaceToDepth = 40,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100160 Prelu = 41,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100161 TransposeConvolution2d = 42,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100162 Resize = 43,
Jan Eilers5b01a892019-07-23 09:47:43 +0100163 Stack = 44,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100164 QuantizedLstm = 45,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100165 Abs = 46,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100166 ArgMinMax = 47,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100167 Slice = 48,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100168 DepthToSpace = 49,
Sadik Armagan26257852019-10-14 13:00:47 +0100169 InstanceNormalization = 50,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100170 LogSoftmax = 51,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +0100171 Comparison = 52,
josh minor4a3c6102020-01-06 16:40:46 -0600172 StandIn = 53,
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000173 ElementwiseUnary = 54,
James Conroy8d333182020-05-13 10:27:58 +0100174 Transpose = 55,
Keith Davis300ad562020-06-04 16:34:23 +0100175 QLstm = 56,
Finn Williams2605b232020-06-10 15:53:46 +0100176 Fill = 57,
James Conroyaba90cd2020-11-06 16:28:18 +0000177 Rank = 58,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +0000178 LogicalBinary = 59,
mathad01b392e982021-04-07 12:07:30 +0100179 Reduce = 60,
Keith Davis3ae3f972021-05-21 16:33:48 +0100180 Cast = 61,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +0100181 Shape = 62,
182 UnidirectionalSequenceLstm = 63,
Simon Obute51f67772021-09-03 15:50:13 +0100183 ChannelShuffle = 64,
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100184 Convolution3d = 65,
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000185 Pooling3d = 66,
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100186 GatherNd = 67,
Samuel Yapa04f4a12022-08-19 11:14:38 +0100187 BatchMatMul = 68,
Mike Kelly3ec30772023-03-08 13:47:17 +0000188 ElementwiseBinary = 69,
Tracy Narine944fb502023-07-04 15:08:57 +0100189 ReverseV2 = 70,
David Monahan616b22f2023-07-25 12:08:10 +0100190 Tile = 71,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000191}
192
193// Base layer table to be used as part of other layers
194table LayerBase {
195 index:uint;
196 layerName:string;
197 layerType:LayerType;
198 inputSlots:[InputSlot];
199 outputSlots:[OutputSlot];
200}
201
202table BindableLayerBase {
203 base:LayerBase;
204 layerBindingId:int;
205}
206
207// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100208
josh minor4a3c6102020-01-06 16:40:46 -0600209/// @deprecated Use ElementwiseUnaryLayer instead
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100210table AbsLayer {
211 base:LayerBase;
212}
213
Mike Kellyaf484012019-02-20 16:53:11 +0000214table ActivationLayer {
215 base:LayerBase;
216 descriptor:ActivationDescriptor;
217}
218
219table ActivationDescriptor {
Tee Jung86bc3d82019-10-01 11:25:56 +0900220 activationFunction:ActivationFunction = Sigmoid;
Mike Kellyaf484012019-02-20 16:53:11 +0000221 a:float;
222 b:float;
223}
224
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000225table AdditionLayer {
226 base:LayerBase;
227}
228
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100229table ArgMinMaxLayer {
230 base:LayerBase;
231 descriptor:ArgMinMaxDescriptor;
232}
233
234table ArgMinMaxDescriptor{
Tee Jung86bc3d82019-10-01 11:25:56 +0900235 argMinMaxFunction:ArgMinMaxFunction;
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100236 axis:int;
237}
238
mathad01b392e982021-04-07 12:07:30 +0100239table CastLayer {
240 base:LayerBase;
241}
242
Simon Obute51f67772021-09-03 15:50:13 +0100243table ChannelShuffleLayer {
244 base:LayerBase;
245 descriptor:ChannelShuffleDescriptor;
246}
247
248table ChannelShuffleDescriptor {
249 axis:uint = 0;
250 numGroups:uint = 0;
251}
252
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100253enum ComparisonOperation : byte {
254 Equal = 0,
255 Greater = 1,
256 GreaterOrEqual = 2,
257 Less = 3,
258 LessOrEqual = 4,
259 NotEqual = 5
260}
261
262table ComparisonDescriptor {
263 operation:ComparisonOperation;
264}
265
266table ComparisonLayer {
267 base:LayerBase;
268 descriptor:ComparisonDescriptor;
269}
270
Conor Kennedy76277882019-02-26 08:29:54 +0000271table ConstantLayer {
272 base:LayerBase;
273 input:ConstTensor;
274}
275
Mike Kellya0766c32019-02-19 17:22:07 +0000276table Convolution2dLayer {
277 base:LayerBase;
278 descriptor:Convolution2dDescriptor;
279 weights:ConstTensor;
280 biases:ConstTensor;
281}
282
283table Convolution2dDescriptor {
284 padLeft:uint;
285 padRight:uint;
286 padTop:uint;
287 padBottom:uint;
288 strideX:uint;
289 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100290 dilationX:uint = 1;
291 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000292 biasEnabled:bool = false;
293 dataLayout:DataLayout = NCHW;
294}
295
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100296table Convolution3dLayer {
297 base:LayerBase;
298 descriptor:Convolution3dDescriptor;
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100299}
300
301table Convolution3dDescriptor {
302 padLeft:uint;
303 padRight:uint;
304 padTop:uint;
305 padBottom:uint;
306 padFront:uint;
307 padBack:uint;
308 strideX:uint;
309 strideY:uint;
310 strideZ:uint;
311 dilationX:uint = 1;
312 dilationY:uint = 1;
313 dilationZ:uint = 1;
314 biasEnabled:bool = false;
315 dataLayout:DataLayout = NDHWC;
316}
317
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100318table DepthToSpaceLayer {
319 base:LayerBase;
320 descriptor:DepthToSpaceDescriptor;
321}
322
323table DepthToSpaceDescriptor {
324 blockSize:uint;
325 dataLayout:DataLayout;
326}
327
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000328table DivisionLayer {
329 base:LayerBase;
330}
331
Mike Kelly3ec30772023-03-08 13:47:17 +0000332enum BinaryOperation : byte {
333 Add = 0,
334 Div = 1,
335 Maximum = 2,
336 Minimum = 3,
337 Mul = 4,
John Mcloughlin0ec00872023-05-15 17:03:49 +0100338 Sub = 5,
339 SqDiff = 6,
340 Power = 7
Mike Kelly3ec30772023-03-08 13:47:17 +0000341}
342
343table ElementwiseBinaryDescriptor {
344 operation:BinaryOperation;
345}
346
347table ElementwiseBinaryLayer {
348 base:LayerBase;
349 descriptor:ElementwiseBinaryDescriptor;
350}
351
josh minor4a3c6102020-01-06 16:40:46 -0600352enum UnaryOperation : byte {
353 Abs = 0,
354 Rsqrt = 1,
355 Sqrt = 2,
356 Exp = 3,
James Conroyaba90cd2020-11-06 16:28:18 +0000357 Neg = 4,
Teresa Charlin50de4fa2021-05-31 18:47:33 +0100358 LogicalNot = 5,
359 Log = 6,
Teresa Charlin93f0ad02023-03-23 15:28:02 +0000360 Sin = 7,
361 Ceil = 8
josh minor4a3c6102020-01-06 16:40:46 -0600362}
363
364table ElementwiseUnaryDescriptor {
365 operation:UnaryOperation;
366}
367
368table ElementwiseUnaryLayer {
369 base:LayerBase;
370 descriptor:ElementwiseUnaryDescriptor;
371}
372
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100373/// @deprecated Use ComparisonLayer instead
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000374table EqualLayer {
375 base:LayerBase;
376}
377
Keith Davis300ad562020-06-04 16:34:23 +0100378table FillLayer {
379 base:LayerBase;
380 descriptor:FillDescriptor;
381}
382
383table FillDescriptor {
384 value:float;
385}
386
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000387table FloorLayer{
388 base:LayerBase;
389}
390
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000391table FullyConnectedLayer {
392 base:LayerBase;
393 descriptor:FullyConnectedDescriptor;
Matthew Sloyan81beae32021-07-13 19:46:11 +0100394 weights:ConstTensor; // ConstTensors are now passed as inputs.
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000395 biases:ConstTensor;
396}
397
398table FullyConnectedDescriptor {
399 biasEnabled:bool = false;
400 transposeWeightsMatrix:bool = false;
Sadik Armaganf0a6dec2021-03-25 07:46:55 +0000401 constantWeights:bool = true;
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000402}
403
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000404table GatherLayer {
405 base:LayerBase;
Teresa Charlin52664732020-06-29 16:27:03 +0100406 descriptor:GatherDescriptor;
407}
408
409table GatherDescriptor {
410 axis:int = 0;
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000411}
412
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100413table GatherNdLayer {
414 base:LayerBase;
415}
416
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100417/// @deprecated Use ComparisonLayer instead
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000418table GreaterLayer {
419 base:LayerBase;
420}
421
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000422table InputLayer {
423 base:BindableLayerBase;
424}
425
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100426table InstanceNormalizationLayer {
427 base:LayerBase;
428 descriptor:InstanceNormalizationDescriptor;
429}
430
431table InstanceNormalizationDescriptor {
432 gamma:float;
433 beta:float;
434 eps:float;
435 dataLayout:DataLayout;
436}
437
Sadik Armagan26257852019-10-14 13:00:47 +0100438table LogSoftmaxLayer {
439 base:LayerBase;
440 descriptor:LogSoftmaxDescriptor;
441}
442
443table LogSoftmaxDescriptor {
444 beta:float = 1;
445 axis:int = -1;
446}
447
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000448table L2NormalizationLayer {
449 base:LayerBase;
450 descriptor:L2NormalizationDescriptor;
451}
452
453table L2NormalizationDescriptor {
454 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100455 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000456}
457
James Conroyaba90cd2020-11-06 16:28:18 +0000458enum LogicalBinaryOperation : byte {
459 LogicalAnd = 0,
460 LogicalOr = 1
461}
462
463table LogicalBinaryDescriptor {
464 operation:LogicalBinaryOperation;
465}
466
467table LogicalBinaryLayer {
468 base:LayerBase;
469 descriptor:LogicalBinaryDescriptor;
470}
471
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000472table MinimumLayer {
473 base:LayerBase;
474}
475
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000476table MaximumLayer {
477 base:LayerBase;
478}
479
Sadik Armagan5f450272019-02-12 14:31:45 +0000480table MultiplicationLayer {
481 base:LayerBase;
482}
483
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000484table Pooling2dLayer {
485 base:LayerBase;
486 descriptor:Pooling2dDescriptor;
487}
488
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000489table Pooling3dLayer {
490 base:LayerBase;
491 descriptor:Pooling3dDescriptor;
492}
493
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000494enum PoolingAlgorithm : byte {
495 Max = 0,
496 Average = 1,
497 L2 = 2
498}
499
500enum OutputShapeRounding : byte {
501 Floor = 0,
502 Ceiling = 1
503}
504
505enum PaddingMethod : byte {
506 IgnoreValue = 0,
507 Exclude = 1
508}
509
510table Pooling2dDescriptor {
511 poolType:PoolingAlgorithm;
512 padLeft:uint;
513 padRight:uint;
514 padTop:uint;
515 padBottom:uint;
516 poolWidth:uint;
517 poolHeight:uint;
518 strideX:uint;
519 strideY:uint;
520 outputShapeRounding:OutputShapeRounding;
521 paddingMethod:PaddingMethod;
522 dataLayout:DataLayout;
523}
524
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000525table Pooling3dDescriptor {
526 poolType:PoolingAlgorithm;
527 padLeft:uint;
528 padRight:uint;
529 padTop:uint;
530 padBottom:uint;
531 padFront:uint;
532 padBack:uint;
533 poolWidth:uint;
534 poolHeight:uint;
535 poolDepth:uint;
536 strideX:uint;
537 strideY:uint;
538 strideZ:uint;
539 outputShapeRounding:OutputShapeRounding;
540 paddingMethod:PaddingMethod;
541 dataLayout:DataLayout;
542}
543
Derek Lamberti87acb272019-03-27 16:51:31 +0000544table QuantizeLayer {
545 base:LayerBase;
546}
547
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000548table SoftmaxLayer {
549 base:LayerBase;
550 descriptor:SoftmaxDescriptor;
551}
552
553table SoftmaxDescriptor {
554 beta:float;
Sadik Armaganfd0cae32021-11-08 17:18:31 +0000555 axis:int = -1;
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000556}
557
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000558table DepthwiseConvolution2dLayer {
559 base:LayerBase;
560 descriptor:DepthwiseConvolution2dDescriptor;
561 weights:ConstTensor;
562 biases:ConstTensor;
563}
564
565table DepthwiseConvolution2dDescriptor {
566 padLeft:uint;
567 padRight:uint;
568 padTop:uint;
569 padBottom:uint;
570 strideX:uint;
571 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100572 dilationX:uint = 1;
573 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000574 biasEnabled:bool = false;
575 dataLayout:DataLayout = NCHW;
576}
577
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000578table OutputLayer {
579 base:BindableLayerBase;
580}
581
Saoirse Stewart263829c2019-02-19 15:54:14 +0000582table ReshapeLayer {
583 base:LayerBase;
584 descriptor:ReshapeDescriptor;
585}
586
587table ReshapeDescriptor {
Keith Davis3ae3f972021-05-21 16:33:48 +0100588 targetShape:[uint];
Saoirse Stewart263829c2019-02-19 15:54:14 +0000589}
590
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000591table PermuteLayer {
592 base:LayerBase;
593 descriptor:PermuteDescriptor;
594}
595
596table PermuteDescriptor {
597 dimMappings:[uint];
598}
599
Keith Davis3ae3f972021-05-21 16:33:48 +0100600table ShapeLayer {
601 base:LayerBase;
602}
603
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000604table SpaceToBatchNdLayer {
605 base:LayerBase;
606 descriptor:SpaceToBatchNdDescriptor;
607}
608
609table SpaceToBatchNdDescriptor {
610 blockShape:[uint];
611 padList:[uint];
612 dataLayout:DataLayout;
613}
614
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100615table SpaceToDepthLayer {
616 base:LayerBase;
617 descriptor:SpaceToDepthDescriptor;
618}
619
620table SpaceToDepthDescriptor {
621 blockSize:uint;
622 dataLayout:DataLayout;
623}
624
Conor Kennedyda1f9752019-03-01 14:37:12 +0000625table SubtractionLayer {
626 base:LayerBase;
627}
628
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000629table BatchToSpaceNdLayer {
630 base:LayerBase;
631 descriptor:BatchToSpaceNdDescriptor;
632}
633
634table BatchToSpaceNdDescriptor {
635 blockShape:[uint];
636 crops:[uint];
637 dataLayout:DataLayout;
638}
639
Nina Drozd57728782019-02-27 10:53:27 +0000640enum NormalizationAlgorithmChannel : byte {
641 Across = 0,
642 Within = 1
643}
644
645enum NormalizationAlgorithmMethod : byte {
646 LocalBrightness = 0,
647 LocalContrast = 1
648}
649
650table NormalizationLayer {
651 base:LayerBase;
652 descriptor:NormalizationDescriptor;
653}
654
655table NormalizationDescriptor {
656 normChannelType:NormalizationAlgorithmChannel = Across;
657 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
658 normSize:uint;
659 alpha:float;
660 beta:float;
661 k:float;
662 dataLayout:DataLayout = NCHW;
663}
664
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000665table MeanLayer {
666 base:LayerBase;
667 descriptor:MeanDescriptor;
668}
669
670table MeanDescriptor {
671 axis:[uint];
672 keepDims:bool = false;
673}
674
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000675table PadLayer {
676 base:LayerBase;
677 descriptor:PadDescriptor;
678}
679
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100680enum PaddingMode : byte {
681 Constant = 0,
682 Reflect = 1,
683 Symmetric = 2
684}
685
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000686table PadDescriptor {
687 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100688 padValue:float = 0;
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100689 paddingMode:PaddingMode = Constant;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000690}
691
josh minor4a3c6102020-01-06 16:40:46 -0600692/// @deprecated Use ElementwiseUnaryLayer instead
Sadik Armagan8b42a382019-03-01 14:24:49 +0000693table RsqrtLayer {
694 base:LayerBase;
695}
696
ruoyan018e7fa232019-02-28 15:09:07 +0000697table BatchNormalizationLayer {
698 base:LayerBase;
699 descriptor:BatchNormalizationDescriptor;
700 mean:ConstTensor;
701 variance:ConstTensor;
702 beta:ConstTensor;
703 gamma:ConstTensor;
704}
705
706table BatchNormalizationDescriptor {
707 eps:float;
708 dataLayout:DataLayout;
709}
710
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100711/// @deprecated Use ResizeLayer instead
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000712table ResizeBilinearLayer {
713 base:LayerBase;
714 descriptor:ResizeBilinearDescriptor;
715}
716
717table ResizeBilinearDescriptor {
718 targetWidth:uint;
719 targetHeight:uint;
720 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100721 alignCorners:bool;
722 halfPixelCenters:bool;
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000723}
724
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100725table SliceLayer {
726 base:LayerBase;
727 descriptor:SliceDescriptor;
728}
729
730table SliceDescriptor {
731 begin:[uint];
732 size:[uint];
733}
734
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000735table StridedSliceLayer {
736 base:LayerBase;
737 descriptor:StridedSliceDescriptor;
738}
739
740table StridedSliceDescriptor {
741 begin:[int];
742 end:[int];
743 stride:[int];
744 beginMask:int;
745 endMask:int;
746 shrinkAxisMask:int;
747 ellipsisMask:int;
748 newAxisMask:int;
749 dataLayout:DataLayout;
750}
751
Jim Flynne242f2d2019-05-22 14:24:13 +0100752table ConcatLayer {
753 base:LayerBase;
754 descriptor:OriginsDescriptor;
755}
756
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100757/// @deprecated Use ConcatLayer instead
Jim Flynnac25a1b2019-02-28 10:40:49 +0000758table MergerLayer {
759 base:LayerBase;
760 descriptor:OriginsDescriptor;
761}
762
763table UintVector {
764 data:[uint];
765}
766
767table OriginsDescriptor {
768 concatAxis:uint;
769 numViews:uint;
770 numDimensions:uint;
771 viewOrigins:[UintVector];
772}
773
Jim Flynn18ce3382019-03-08 11:08:30 +0000774table ViewsDescriptor {
775 origins:OriginsDescriptor;
776 viewSizes:[UintVector];
Mike Kellyfca59162023-08-08 12:00:28 +0100777 hasAxis:bool;
778 axis:int;
Jim Flynn18ce3382019-03-08 11:08:30 +0000779}
780
781table SplitterLayer {
782 base:LayerBase;
783 descriptor:ViewsDescriptor;
784}
785
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000786table DetectionPostProcessLayer {
787 base:LayerBase;
788 descriptor:DetectionPostProcessDescriptor;
789 anchors:ConstTensor;
790}
791
792table DetectionPostProcessDescriptor {
793 maxDetections:uint;
794 maxClassesPerDetection:uint;
795 detectionsPerClass:uint;
796 nmsScoreThreshold:float;
797 nmsIouThreshold:float;
798 numClasses:uint;
799 useRegularNms:bool;
800 scaleX:float;
801 scaleY:float;
802 scaleW:float;
803 scaleH:float;
804}
805
Jim Flynn11af3752019-03-19 17:22:29 +0000806table LstmInputParams {
807 inputToForgetWeights:ConstTensor;
808 inputToCellWeights:ConstTensor;
809 inputToOutputWeights:ConstTensor;
810 recurrentToForgetWeights:ConstTensor;
811 recurrentToCellWeights:ConstTensor;
812 recurrentToOutputWeights:ConstTensor;
813 forgetGateBias:ConstTensor;
814 cellBias:ConstTensor;
815 outputGateBias:ConstTensor;
816
817 inputToInputWeights:ConstTensor;
818 recurrentToInputWeights:ConstTensor;
819 cellToInputWeights:ConstTensor;
820 inputGateBias:ConstTensor;
821
822 projectionWeights:ConstTensor;
823 projectionBias:ConstTensor;
824
825 cellToForgetWeights:ConstTensor;
826 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100827
828 inputLayerNormWeights:ConstTensor;
829 forgetLayerNormWeights:ConstTensor;
830 cellLayerNormWeights:ConstTensor;
831 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000832}
833
James Conroy8d333182020-05-13 10:27:58 +0100834table LstmDescriptor {
835 activationFunc:uint;
836 clippingThresCell:float;
837 clippingThresProj:float;
838 cifgEnabled:bool = true;
839 peepholeEnabled:bool = false;
840 projectionEnabled:bool = false;
841 layerNormEnabled:bool = false;
842}
843
844table LstmLayer {
845 base:LayerBase;
846 descriptor:LstmDescriptor;
847 inputParams:LstmInputParams;
848}
849
850table QLstmInputParams {
851 // Mandatory
852 inputToForgetWeights:ConstTensor;
853 inputToCellWeights:ConstTensor;
854 inputToOutputWeights:ConstTensor;
855
856 recurrentToForgetWeights:ConstTensor;
857 recurrentToCellWeights:ConstTensor;
858 recurrentToOutputWeights:ConstTensor;
859
860 forgetGateBias:ConstTensor;
861 cellBias:ConstTensor;
862 outputGateBias:ConstTensor;
863
864 // CIFG
865 inputToInputWeights:ConstTensor;
866 recurrentToInputWeights:ConstTensor;
867 inputGateBias:ConstTensor;
868
869 // Projection
870 projectionWeights:ConstTensor;
871 projectionBias:ConstTensor;
872
873 // Peephole
874 cellToInputWeights:ConstTensor;
875 cellToForgetWeights:ConstTensor;
876 cellToOutputWeights:ConstTensor;
877
878 // Layer norm
879 inputLayerNormWeights:ConstTensor;
880 forgetLayerNormWeights:ConstTensor;
881 cellLayerNormWeights:ConstTensor;
882 outputLayerNormWeights:ConstTensor;
883}
884
885table QLstmDescriptor {
886 cifgEnabled:bool = true;
887 peepholeEnabled:bool = false;
888 projectionEnabled:bool = false;
889 layerNormEnabled:bool = false;
890
891 cellClip:float;
892 projectionClip:float;
893
894 inputIntermediateScale:float;
895 forgetIntermediateScale:float;
896 cellIntermediateScale:float;
897 outputIntermediateScale:float;
898
899 hiddenStateZeroPoint:int;
900 hiddenStateScale:float;
901}
902
903table QLstmLayer {
904 base:LayerBase;
905 descriptor:QLstmDescriptor;
906 inputParams:QLstmInputParams;
907}
908
Jan Eilers5b01a892019-07-23 09:47:43 +0100909table QuantizedLstmInputParams {
910 inputToInputWeights:ConstTensor;
911 inputToForgetWeights:ConstTensor;
912 inputToCellWeights:ConstTensor;
913 inputToOutputWeights:ConstTensor;
914
915 recurrentToInputWeights:ConstTensor;
916 recurrentToForgetWeights:ConstTensor;
917 recurrentToCellWeights:ConstTensor;
918 recurrentToOutputWeights:ConstTensor;
919
920 inputGateBias:ConstTensor;
921 forgetGateBias:ConstTensor;
922 cellBias:ConstTensor;
923 outputGateBias:ConstTensor;
924}
925
Jan Eilers5b01a892019-07-23 09:47:43 +0100926table QuantizedLstmLayer {
927 base:LayerBase;
928 inputParams:QuantizedLstmInputParams;
929}
930
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000931table DequantizeLayer {
932 base:LayerBase;
933}
934
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100935table MergeLayer {
936 base:LayerBase;
937}
938
Sadik Armaganeff363d2019-04-05 15:25:46 +0100939table SwitchLayer {
940 base:LayerBase;
941}
942
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100943table PreluLayer {
944 base:LayerBase;
945}
946
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100947table TransposeConvolution2dLayer {
948 base:LayerBase;
949 descriptor:TransposeConvolution2dDescriptor;
950 weights:ConstTensor;
951 biases:ConstTensor;
952}
953
954table TransposeConvolution2dDescriptor {
955 padLeft:uint;
956 padRight:uint;
957 padTop:uint;
958 padBottom:uint;
959 strideX:uint;
960 strideY:uint;
961 biasEnabled:bool = false;
962 dataLayout:DataLayout = NCHW;
963}
964
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000965table TransposeLayer {
966 base:LayerBase;
967 descriptor:TransposeDescriptor;
968}
969
970table TransposeDescriptor {
971 dimMappings:[uint];
972}
973
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100974table ResizeLayer {
975 base:LayerBase;
976 descriptor:ResizeDescriptor;
977}
978
979table ResizeDescriptor {
980 targetHeight:uint;
981 targetWidth:uint;
982 method:ResizeMethod = NearestNeighbor;
983 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100984 alignCorners:bool;
985 halfPixelCenters:bool;
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100986}
987
Tracy Narine944fb502023-07-04 15:08:57 +0100988table ReverseV2Layer {
989 base:LayerBase;
Tracy Narine944fb502023-07-04 15:08:57 +0100990}
991
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100992table StackLayer {
993 base:LayerBase;
994 descriptor:StackDescriptor;
995}
996
997table StackDescriptor {
998 axis:uint;
999 numInputs:uint;
1000 inputShape:[uint];
1001}
1002
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001003table StandInDescriptor {
1004 numInputs:uint;
1005 numOutputs:uint;
1006}
1007
1008table StandInLayer {
1009 base:LayerBase;
1010 descriptor:StandInDescriptor;
1011}
1012
Finn Williams2605b232020-06-10 15:53:46 +01001013table RankLayer {
1014 base:LayerBase;
1015}
1016
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001017table ReduceLayer {
1018 base:LayerBase;
1019 descriptor:ReduceDescriptor;
1020}
1021
1022table ReduceDescriptor {
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001023 keepDims:bool = false;
1024 axis:[uint];
1025 reduceOperation:ReduceOperation = Sum;
1026}
1027
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001028table UnidirectionalSequenceLstmDescriptor {
1029 activationFunc:uint;
1030 clippingThresCell:float;
1031 clippingThresProj:float;
1032 cifgEnabled:bool = true;
1033 peepholeEnabled:bool = false;
1034 projectionEnabled:bool = false;
1035 layerNormEnabled:bool = false;
1036 timeMajor:bool = false;
1037}
1038
1039table UnidirectionalSequenceLstmLayer {
1040 base:LayerBase;
1041 descriptor:UnidirectionalSequenceLstmDescriptor;
1042 inputParams:LstmInputParams;
1043}
1044
Samuel Yapa04f4a12022-08-19 11:14:38 +01001045table BatchMatMulDescriptor {
1046 transposeX:bool = false;
1047 transposeY:bool = false;
1048 adjointX:bool = false;
1049 adjointY:bool = false;
1050 dataLayoutX:DataLayout = NCHW;
1051 dataLayoutY:DataLayout = NCHW;
1052}
1053
1054table BatchMatMulLayer {
1055 base:LayerBase;
1056 descriptor:BatchMatMulDescriptor;
1057}
1058
David Monahan616b22f2023-07-25 12:08:10 +01001059table TileDescriptor {
1060 m_Multiples:[uint];
1061}
1062
1063table TileLayer {
1064 base:LayerBase;
1065 descriptor:TileDescriptor;
1066}
1067
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001068union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +00001069 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001070 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +00001071 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +00001072 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +00001073 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +00001074 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +00001075 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +00001076 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001077 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +00001078 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +00001079 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +00001080 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +00001081 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +00001082 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +00001083 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +00001084 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +00001085 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +00001086 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +00001087 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +00001088 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +00001089 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +00001090 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +00001091 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +00001092 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +00001093 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +00001094 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +00001095 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +00001096 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +00001097 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +00001098 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +00001099 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +00001100 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +00001101 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +00001102 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +00001103 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +01001104 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +00001105 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +01001106 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +01001107 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +01001108 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +01001109 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +01001110 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +01001111 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +01001112 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +01001113 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +01001114 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +01001115 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +01001116 ArgMinMaxLayer,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +01001117 SliceLayer,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +01001118 DepthToSpaceLayer,
Sadik Armagan26257852019-10-14 13:00:47 +01001119 InstanceNormalizationLayer,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +01001120 LogSoftmaxLayer,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001121 ComparisonLayer,
josh minor4a3c6102020-01-06 16:40:46 -06001122 StandInLayer,
Mike Kellyc9ea45a2020-02-28 18:11:58 +00001123 ElementwiseUnaryLayer,
James Conroy8d333182020-05-13 10:27:58 +01001124 TransposeLayer,
Keith Davis300ad562020-06-04 16:34:23 +01001125 QLstmLayer,
Finn Williams2605b232020-06-10 15:53:46 +01001126 FillLayer,
James Conroyaba90cd2020-11-06 16:28:18 +00001127 RankLayer,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001128 LogicalBinaryLayer,
mathad01b392e982021-04-07 12:07:30 +01001129 ReduceLayer,
Keith Davis3ae3f972021-05-21 16:33:48 +01001130 CastLayer,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001131 ShapeLayer,
1132 UnidirectionalSequenceLstmLayer,
Simon Obute51f67772021-09-03 15:50:13 +01001133 ChannelShuffleLayer,
Matthew Sloyanb63a3112021-09-08 13:05:51 +01001134 Convolution3dLayer,
Tamas Nyirid998a1c2021-11-05 14:55:33 +00001135 Pooling3dLayer,
Teresa Charlin6966bfa2022-04-25 17:14:50 +01001136 GatherNdLayer,
Samuel Yapa04f4a12022-08-19 11:14:38 +01001137 BatchMatMulLayer,
Mike Kelly3ec30772023-03-08 13:47:17 +00001138 ElementwiseBinaryLayer,
Tracy Narine944fb502023-07-04 15:08:57 +01001139 ReverseV2Layer,
David Monahan616b22f2023-07-25 12:08:10 +01001140 TileLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001141}
1142
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001143table AnyLayer {
1144 layer:Layer;
1145}
1146
Tee Jungaa920c52019-11-05 10:48:25 +00001147table FeatureCompatibilityVersions {
1148 bindingIdsScheme:uint = 0;
Jan Eilers53ef7952021-06-02 12:01:25 +01001149 weightsLayoutScheme:uint = 0;
Matthew Sloyan81beae32021-07-13 19:46:11 +01001150 constantTensorsAsInputs:uint = 0;
Tee Jungaa920c52019-11-05 10:48:25 +00001151}
1152
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001153// Root type for serialized data is the graph of the network
1154table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001155 layers:[AnyLayer];
Tee Jungaa920c52019-11-05 10:48:25 +00001156 inputIds:[int];
1157 outputIds:[int];
1158 featureVersions:FeatureCompatibilityVersions;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001159}
1160
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001161root_type SerializedGraph;