blob: 76a1c1278701aaed0916ce0f5be68cd117f610f4 [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;
109}
110
111table OutputSlot {
112 index:uint;
113 tensorInfo:TensorInfo;
114}
115
116enum LayerType : uint {
117 Addition = 0,
118 Input = 1,
Sadik Armagan5f450272019-02-12 14:31:45 +0000119 Multiplication = 2,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000120 Output = 3,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000121 Pooling2d = 4,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000122 Reshape = 5,
Mike Kellya0766c32019-02-19 17:22:07 +0000123 Softmax = 6,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000124 Convolution2d = 7,
Mike Kellyaf484012019-02-20 16:53:11 +0000125 DepthwiseConvolution2d = 8,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000126 Activation = 9,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000127 Permute = 10,
Conor Kennedy76277882019-02-26 08:29:54 +0000128 FullyConnected = 11,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000129 Constant = 12,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000130 SpaceToBatchNd = 13,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000131 BatchToSpaceNd = 14,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000132 Division = 15,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000133 Minimum = 16,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000134 Equal = 17,
Nina Drozd57728782019-02-27 10:53:27 +0000135 Maximum = 18,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000136 Normalization = 19,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000137 Pad = 20,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000138 Rsqrt = 21,
ruoyan018e7fa232019-02-28 15:09:07 +0000139 Floor = 22,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000140 BatchNormalization = 23,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000141 Greater = 24,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000142 ResizeBilinear = 25,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000143 Subtraction = 26,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000144 StridedSlice = 27,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000145 Gather = 28,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000146 Mean = 29,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000147 Merger = 30,
Jim Flynn18ce3382019-03-08 11:08:30 +0000148 L2Normalization = 31,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000149 Splitter = 32,
Jim Flynn11af3752019-03-19 17:22:29 +0000150 DetectionPostProcess = 33,
Derek Lamberti87acb272019-03-27 16:51:31 +0000151 Lstm = 34,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000152 Quantize = 35,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100153 Dequantize = 36,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100154 Merge = 37,
Jim Flynne242f2d2019-05-22 14:24:13 +0100155 Switch = 38,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100156 Concat = 39,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100157 SpaceToDepth = 40,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100158 Prelu = 41,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100159 TransposeConvolution2d = 42,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100160 Resize = 43,
Jan Eilers5b01a892019-07-23 09:47:43 +0100161 Stack = 44,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100162 QuantizedLstm = 45,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100163 Abs = 46,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100164 ArgMinMax = 47,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100165 Slice = 48,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100166 DepthToSpace = 49,
Sadik Armagan26257852019-10-14 13:00:47 +0100167 InstanceNormalization = 50,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100168 LogSoftmax = 51,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +0100169 Comparison = 52,
josh minor4a3c6102020-01-06 16:40:46 -0600170 StandIn = 53,
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000171 ElementwiseUnary = 54,
James Conroy8d333182020-05-13 10:27:58 +0100172 Transpose = 55,
Keith Davis300ad562020-06-04 16:34:23 +0100173 QLstm = 56,
Finn Williams2605b232020-06-10 15:53:46 +0100174 Fill = 57,
James Conroyaba90cd2020-11-06 16:28:18 +0000175 Rank = 58,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +0000176 LogicalBinary = 59,
mathad01b392e982021-04-07 12:07:30 +0100177 Reduce = 60,
Keith Davis3ae3f972021-05-21 16:33:48 +0100178 Cast = 61,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +0100179 Shape = 62,
180 UnidirectionalSequenceLstm = 63,
Simon Obute51f67772021-09-03 15:50:13 +0100181 ChannelShuffle = 64,
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100182 Convolution3d = 65,
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000183 Pooling3d = 66,
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100184 GatherNd = 67,
Samuel Yapa04f4a12022-08-19 11:14:38 +0100185 BatchMatMul = 68,
Mike Kelly3ec30772023-03-08 13:47:17 +0000186 ElementwiseBinary = 69,
Tracy Narine944fb502023-07-04 15:08:57 +0100187 ReverseV2 = 70,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000188}
189
190// Base layer table to be used as part of other layers
191table LayerBase {
192 index:uint;
193 layerName:string;
194 layerType:LayerType;
195 inputSlots:[InputSlot];
196 outputSlots:[OutputSlot];
197}
198
199table BindableLayerBase {
200 base:LayerBase;
201 layerBindingId:int;
202}
203
204// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100205
josh minor4a3c6102020-01-06 16:40:46 -0600206/// @deprecated Use ElementwiseUnaryLayer instead
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100207table AbsLayer {
208 base:LayerBase;
209}
210
Mike Kellyaf484012019-02-20 16:53:11 +0000211table ActivationLayer {
212 base:LayerBase;
213 descriptor:ActivationDescriptor;
214}
215
216table ActivationDescriptor {
Tee Jung86bc3d82019-10-01 11:25:56 +0900217 activationFunction:ActivationFunction = Sigmoid;
Mike Kellyaf484012019-02-20 16:53:11 +0000218 a:float;
219 b:float;
220}
221
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000222table AdditionLayer {
223 base:LayerBase;
224}
225
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100226table ArgMinMaxLayer {
227 base:LayerBase;
228 descriptor:ArgMinMaxDescriptor;
229}
230
231table ArgMinMaxDescriptor{
Tee Jung86bc3d82019-10-01 11:25:56 +0900232 argMinMaxFunction:ArgMinMaxFunction;
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100233 axis:int;
234}
235
mathad01b392e982021-04-07 12:07:30 +0100236table CastLayer {
237 base:LayerBase;
238}
239
Simon Obute51f67772021-09-03 15:50:13 +0100240table ChannelShuffleLayer {
241 base:LayerBase;
242 descriptor:ChannelShuffleDescriptor;
243}
244
245table ChannelShuffleDescriptor {
246 axis:uint = 0;
247 numGroups:uint = 0;
248}
249
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100250enum ComparisonOperation : byte {
251 Equal = 0,
252 Greater = 1,
253 GreaterOrEqual = 2,
254 Less = 3,
255 LessOrEqual = 4,
256 NotEqual = 5
257}
258
259table ComparisonDescriptor {
260 operation:ComparisonOperation;
261}
262
263table ComparisonLayer {
264 base:LayerBase;
265 descriptor:ComparisonDescriptor;
266}
267
Conor Kennedy76277882019-02-26 08:29:54 +0000268table ConstantLayer {
269 base:LayerBase;
270 input:ConstTensor;
271}
272
Mike Kellya0766c32019-02-19 17:22:07 +0000273table Convolution2dLayer {
274 base:LayerBase;
275 descriptor:Convolution2dDescriptor;
276 weights:ConstTensor;
277 biases:ConstTensor;
278}
279
280table Convolution2dDescriptor {
281 padLeft:uint;
282 padRight:uint;
283 padTop:uint;
284 padBottom:uint;
285 strideX:uint;
286 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100287 dilationX:uint = 1;
288 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000289 biasEnabled:bool = false;
290 dataLayout:DataLayout = NCHW;
291}
292
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100293table Convolution3dLayer {
294 base:LayerBase;
295 descriptor:Convolution3dDescriptor;
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100296}
297
298table Convolution3dDescriptor {
299 padLeft:uint;
300 padRight:uint;
301 padTop:uint;
302 padBottom:uint;
303 padFront:uint;
304 padBack:uint;
305 strideX:uint;
306 strideY:uint;
307 strideZ:uint;
308 dilationX:uint = 1;
309 dilationY:uint = 1;
310 dilationZ:uint = 1;
311 biasEnabled:bool = false;
312 dataLayout:DataLayout = NDHWC;
313}
314
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100315table DepthToSpaceLayer {
316 base:LayerBase;
317 descriptor:DepthToSpaceDescriptor;
318}
319
320table DepthToSpaceDescriptor {
321 blockSize:uint;
322 dataLayout:DataLayout;
323}
324
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000325table DivisionLayer {
326 base:LayerBase;
327}
328
Mike Kelly3ec30772023-03-08 13:47:17 +0000329enum BinaryOperation : byte {
330 Add = 0,
331 Div = 1,
332 Maximum = 2,
333 Minimum = 3,
334 Mul = 4,
John Mcloughlin0ec00872023-05-15 17:03:49 +0100335 Sub = 5,
336 SqDiff = 6,
337 Power = 7
Mike Kelly3ec30772023-03-08 13:47:17 +0000338}
339
340table ElementwiseBinaryDescriptor {
341 operation:BinaryOperation;
342}
343
344table ElementwiseBinaryLayer {
345 base:LayerBase;
346 descriptor:ElementwiseBinaryDescriptor;
347}
348
josh minor4a3c6102020-01-06 16:40:46 -0600349enum UnaryOperation : byte {
350 Abs = 0,
351 Rsqrt = 1,
352 Sqrt = 2,
353 Exp = 3,
James Conroyaba90cd2020-11-06 16:28:18 +0000354 Neg = 4,
Teresa Charlin50de4fa2021-05-31 18:47:33 +0100355 LogicalNot = 5,
356 Log = 6,
Teresa Charlin93f0ad02023-03-23 15:28:02 +0000357 Sin = 7,
358 Ceil = 8
josh minor4a3c6102020-01-06 16:40:46 -0600359}
360
361table ElementwiseUnaryDescriptor {
362 operation:UnaryOperation;
363}
364
365table ElementwiseUnaryLayer {
366 base:LayerBase;
367 descriptor:ElementwiseUnaryDescriptor;
368}
369
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100370/// @deprecated Use ComparisonLayer instead
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000371table EqualLayer {
372 base:LayerBase;
373}
374
Keith Davis300ad562020-06-04 16:34:23 +0100375table FillLayer {
376 base:LayerBase;
377 descriptor:FillDescriptor;
378}
379
380table FillDescriptor {
381 value:float;
382}
383
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000384table FloorLayer{
385 base:LayerBase;
386}
387
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000388table FullyConnectedLayer {
389 base:LayerBase;
390 descriptor:FullyConnectedDescriptor;
Matthew Sloyan81beae32021-07-13 19:46:11 +0100391 weights:ConstTensor; // ConstTensors are now passed as inputs.
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000392 biases:ConstTensor;
393}
394
395table FullyConnectedDescriptor {
396 biasEnabled:bool = false;
397 transposeWeightsMatrix:bool = false;
Sadik Armaganf0a6dec2021-03-25 07:46:55 +0000398 constantWeights:bool = true;
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000399}
400
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000401table GatherLayer {
402 base:LayerBase;
Teresa Charlin52664732020-06-29 16:27:03 +0100403 descriptor:GatherDescriptor;
404}
405
406table GatherDescriptor {
407 axis:int = 0;
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000408}
409
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100410table GatherNdLayer {
411 base:LayerBase;
412}
413
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100414/// @deprecated Use ComparisonLayer instead
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000415table GreaterLayer {
416 base:LayerBase;
417}
418
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000419table InputLayer {
420 base:BindableLayerBase;
421}
422
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100423table InstanceNormalizationLayer {
424 base:LayerBase;
425 descriptor:InstanceNormalizationDescriptor;
426}
427
428table InstanceNormalizationDescriptor {
429 gamma:float;
430 beta:float;
431 eps:float;
432 dataLayout:DataLayout;
433}
434
Sadik Armagan26257852019-10-14 13:00:47 +0100435table LogSoftmaxLayer {
436 base:LayerBase;
437 descriptor:LogSoftmaxDescriptor;
438}
439
440table LogSoftmaxDescriptor {
441 beta:float = 1;
442 axis:int = -1;
443}
444
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000445table L2NormalizationLayer {
446 base:LayerBase;
447 descriptor:L2NormalizationDescriptor;
448}
449
450table L2NormalizationDescriptor {
451 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100452 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000453}
454
James Conroyaba90cd2020-11-06 16:28:18 +0000455enum LogicalBinaryOperation : byte {
456 LogicalAnd = 0,
457 LogicalOr = 1
458}
459
460table LogicalBinaryDescriptor {
461 operation:LogicalBinaryOperation;
462}
463
464table LogicalBinaryLayer {
465 base:LayerBase;
466 descriptor:LogicalBinaryDescriptor;
467}
468
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000469table MinimumLayer {
470 base:LayerBase;
471}
472
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000473table MaximumLayer {
474 base:LayerBase;
475}
476
Sadik Armagan5f450272019-02-12 14:31:45 +0000477table MultiplicationLayer {
478 base:LayerBase;
479}
480
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000481table Pooling2dLayer {
482 base:LayerBase;
483 descriptor:Pooling2dDescriptor;
484}
485
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000486table Pooling3dLayer {
487 base:LayerBase;
488 descriptor:Pooling3dDescriptor;
489}
490
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000491enum PoolingAlgorithm : byte {
492 Max = 0,
493 Average = 1,
494 L2 = 2
495}
496
497enum OutputShapeRounding : byte {
498 Floor = 0,
499 Ceiling = 1
500}
501
502enum PaddingMethod : byte {
503 IgnoreValue = 0,
504 Exclude = 1
505}
506
507table Pooling2dDescriptor {
508 poolType:PoolingAlgorithm;
509 padLeft:uint;
510 padRight:uint;
511 padTop:uint;
512 padBottom:uint;
513 poolWidth:uint;
514 poolHeight:uint;
515 strideX:uint;
516 strideY:uint;
517 outputShapeRounding:OutputShapeRounding;
518 paddingMethod:PaddingMethod;
519 dataLayout:DataLayout;
520}
521
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000522table Pooling3dDescriptor {
523 poolType:PoolingAlgorithm;
524 padLeft:uint;
525 padRight:uint;
526 padTop:uint;
527 padBottom:uint;
528 padFront:uint;
529 padBack:uint;
530 poolWidth:uint;
531 poolHeight:uint;
532 poolDepth:uint;
533 strideX:uint;
534 strideY:uint;
535 strideZ:uint;
536 outputShapeRounding:OutputShapeRounding;
537 paddingMethod:PaddingMethod;
538 dataLayout:DataLayout;
539}
540
Derek Lamberti87acb272019-03-27 16:51:31 +0000541table QuantizeLayer {
542 base:LayerBase;
543}
544
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000545table SoftmaxLayer {
546 base:LayerBase;
547 descriptor:SoftmaxDescriptor;
548}
549
550table SoftmaxDescriptor {
551 beta:float;
Sadik Armaganfd0cae32021-11-08 17:18:31 +0000552 axis:int = -1;
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000553}
554
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000555table DepthwiseConvolution2dLayer {
556 base:LayerBase;
557 descriptor:DepthwiseConvolution2dDescriptor;
558 weights:ConstTensor;
559 biases:ConstTensor;
560}
561
562table DepthwiseConvolution2dDescriptor {
563 padLeft:uint;
564 padRight:uint;
565 padTop:uint;
566 padBottom:uint;
567 strideX:uint;
568 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100569 dilationX:uint = 1;
570 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000571 biasEnabled:bool = false;
572 dataLayout:DataLayout = NCHW;
573}
574
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000575table OutputLayer {
576 base:BindableLayerBase;
577}
578
Saoirse Stewart263829c2019-02-19 15:54:14 +0000579table ReshapeLayer {
580 base:LayerBase;
581 descriptor:ReshapeDescriptor;
582}
583
584table ReshapeDescriptor {
Keith Davis3ae3f972021-05-21 16:33:48 +0100585 targetShape:[uint];
Saoirse Stewart263829c2019-02-19 15:54:14 +0000586}
587
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000588table PermuteLayer {
589 base:LayerBase;
590 descriptor:PermuteDescriptor;
591}
592
593table PermuteDescriptor {
594 dimMappings:[uint];
595}
596
Keith Davis3ae3f972021-05-21 16:33:48 +0100597table ShapeLayer {
598 base:LayerBase;
599}
600
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000601table SpaceToBatchNdLayer {
602 base:LayerBase;
603 descriptor:SpaceToBatchNdDescriptor;
604}
605
606table SpaceToBatchNdDescriptor {
607 blockShape:[uint];
608 padList:[uint];
609 dataLayout:DataLayout;
610}
611
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100612table SpaceToDepthLayer {
613 base:LayerBase;
614 descriptor:SpaceToDepthDescriptor;
615}
616
617table SpaceToDepthDescriptor {
618 blockSize:uint;
619 dataLayout:DataLayout;
620}
621
Conor Kennedyda1f9752019-03-01 14:37:12 +0000622table SubtractionLayer {
623 base:LayerBase;
624}
625
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000626table BatchToSpaceNdLayer {
627 base:LayerBase;
628 descriptor:BatchToSpaceNdDescriptor;
629}
630
631table BatchToSpaceNdDescriptor {
632 blockShape:[uint];
633 crops:[uint];
634 dataLayout:DataLayout;
635}
636
Nina Drozd57728782019-02-27 10:53:27 +0000637enum NormalizationAlgorithmChannel : byte {
638 Across = 0,
639 Within = 1
640}
641
642enum NormalizationAlgorithmMethod : byte {
643 LocalBrightness = 0,
644 LocalContrast = 1
645}
646
647table NormalizationLayer {
648 base:LayerBase;
649 descriptor:NormalizationDescriptor;
650}
651
652table NormalizationDescriptor {
653 normChannelType:NormalizationAlgorithmChannel = Across;
654 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
655 normSize:uint;
656 alpha:float;
657 beta:float;
658 k:float;
659 dataLayout:DataLayout = NCHW;
660}
661
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000662table MeanLayer {
663 base:LayerBase;
664 descriptor:MeanDescriptor;
665}
666
667table MeanDescriptor {
668 axis:[uint];
669 keepDims:bool = false;
670}
671
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000672table PadLayer {
673 base:LayerBase;
674 descriptor:PadDescriptor;
675}
676
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100677enum PaddingMode : byte {
678 Constant = 0,
679 Reflect = 1,
680 Symmetric = 2
681}
682
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000683table PadDescriptor {
684 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100685 padValue:float = 0;
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100686 paddingMode:PaddingMode = Constant;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000687}
688
josh minor4a3c6102020-01-06 16:40:46 -0600689/// @deprecated Use ElementwiseUnaryLayer instead
Sadik Armagan8b42a382019-03-01 14:24:49 +0000690table RsqrtLayer {
691 base:LayerBase;
692}
693
ruoyan018e7fa232019-02-28 15:09:07 +0000694table BatchNormalizationLayer {
695 base:LayerBase;
696 descriptor:BatchNormalizationDescriptor;
697 mean:ConstTensor;
698 variance:ConstTensor;
699 beta:ConstTensor;
700 gamma:ConstTensor;
701}
702
703table BatchNormalizationDescriptor {
704 eps:float;
705 dataLayout:DataLayout;
706}
707
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100708/// @deprecated Use ResizeLayer instead
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000709table ResizeBilinearLayer {
710 base:LayerBase;
711 descriptor:ResizeBilinearDescriptor;
712}
713
714table ResizeBilinearDescriptor {
715 targetWidth:uint;
716 targetHeight:uint;
717 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100718 alignCorners:bool;
719 halfPixelCenters:bool;
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000720}
721
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100722table SliceLayer {
723 base:LayerBase;
724 descriptor:SliceDescriptor;
725}
726
727table SliceDescriptor {
728 begin:[uint];
729 size:[uint];
730}
731
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000732table StridedSliceLayer {
733 base:LayerBase;
734 descriptor:StridedSliceDescriptor;
735}
736
737table StridedSliceDescriptor {
738 begin:[int];
739 end:[int];
740 stride:[int];
741 beginMask:int;
742 endMask:int;
743 shrinkAxisMask:int;
744 ellipsisMask:int;
745 newAxisMask:int;
746 dataLayout:DataLayout;
747}
748
Jim Flynne242f2d2019-05-22 14:24:13 +0100749table ConcatLayer {
750 base:LayerBase;
751 descriptor:OriginsDescriptor;
752}
753
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100754/// @deprecated Use ConcatLayer instead
Jim Flynnac25a1b2019-02-28 10:40:49 +0000755table MergerLayer {
756 base:LayerBase;
757 descriptor:OriginsDescriptor;
758}
759
760table UintVector {
761 data:[uint];
762}
763
764table OriginsDescriptor {
765 concatAxis:uint;
766 numViews:uint;
767 numDimensions:uint;
768 viewOrigins:[UintVector];
769}
770
Jim Flynn18ce3382019-03-08 11:08:30 +0000771table ViewsDescriptor {
772 origins:OriginsDescriptor;
773 viewSizes:[UintVector];
774}
775
776table SplitterLayer {
777 base:LayerBase;
778 descriptor:ViewsDescriptor;
779}
780
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000781table DetectionPostProcessLayer {
782 base:LayerBase;
783 descriptor:DetectionPostProcessDescriptor;
784 anchors:ConstTensor;
785}
786
787table DetectionPostProcessDescriptor {
788 maxDetections:uint;
789 maxClassesPerDetection:uint;
790 detectionsPerClass:uint;
791 nmsScoreThreshold:float;
792 nmsIouThreshold:float;
793 numClasses:uint;
794 useRegularNms:bool;
795 scaleX:float;
796 scaleY:float;
797 scaleW:float;
798 scaleH:float;
799}
800
Jim Flynn11af3752019-03-19 17:22:29 +0000801table LstmInputParams {
802 inputToForgetWeights:ConstTensor;
803 inputToCellWeights:ConstTensor;
804 inputToOutputWeights:ConstTensor;
805 recurrentToForgetWeights:ConstTensor;
806 recurrentToCellWeights:ConstTensor;
807 recurrentToOutputWeights:ConstTensor;
808 forgetGateBias:ConstTensor;
809 cellBias:ConstTensor;
810 outputGateBias:ConstTensor;
811
812 inputToInputWeights:ConstTensor;
813 recurrentToInputWeights:ConstTensor;
814 cellToInputWeights:ConstTensor;
815 inputGateBias:ConstTensor;
816
817 projectionWeights:ConstTensor;
818 projectionBias:ConstTensor;
819
820 cellToForgetWeights:ConstTensor;
821 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100822
823 inputLayerNormWeights:ConstTensor;
824 forgetLayerNormWeights:ConstTensor;
825 cellLayerNormWeights:ConstTensor;
826 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000827}
828
James Conroy8d333182020-05-13 10:27:58 +0100829table LstmDescriptor {
830 activationFunc:uint;
831 clippingThresCell:float;
832 clippingThresProj:float;
833 cifgEnabled:bool = true;
834 peepholeEnabled:bool = false;
835 projectionEnabled:bool = false;
836 layerNormEnabled:bool = false;
837}
838
839table LstmLayer {
840 base:LayerBase;
841 descriptor:LstmDescriptor;
842 inputParams:LstmInputParams;
843}
844
845table QLstmInputParams {
846 // Mandatory
847 inputToForgetWeights:ConstTensor;
848 inputToCellWeights:ConstTensor;
849 inputToOutputWeights:ConstTensor;
850
851 recurrentToForgetWeights:ConstTensor;
852 recurrentToCellWeights:ConstTensor;
853 recurrentToOutputWeights:ConstTensor;
854
855 forgetGateBias:ConstTensor;
856 cellBias:ConstTensor;
857 outputGateBias:ConstTensor;
858
859 // CIFG
860 inputToInputWeights:ConstTensor;
861 recurrentToInputWeights:ConstTensor;
862 inputGateBias:ConstTensor;
863
864 // Projection
865 projectionWeights:ConstTensor;
866 projectionBias:ConstTensor;
867
868 // Peephole
869 cellToInputWeights:ConstTensor;
870 cellToForgetWeights:ConstTensor;
871 cellToOutputWeights:ConstTensor;
872
873 // Layer norm
874 inputLayerNormWeights:ConstTensor;
875 forgetLayerNormWeights:ConstTensor;
876 cellLayerNormWeights:ConstTensor;
877 outputLayerNormWeights:ConstTensor;
878}
879
880table QLstmDescriptor {
881 cifgEnabled:bool = true;
882 peepholeEnabled:bool = false;
883 projectionEnabled:bool = false;
884 layerNormEnabled:bool = false;
885
886 cellClip:float;
887 projectionClip:float;
888
889 inputIntermediateScale:float;
890 forgetIntermediateScale:float;
891 cellIntermediateScale:float;
892 outputIntermediateScale:float;
893
894 hiddenStateZeroPoint:int;
895 hiddenStateScale:float;
896}
897
898table QLstmLayer {
899 base:LayerBase;
900 descriptor:QLstmDescriptor;
901 inputParams:QLstmInputParams;
902}
903
Jan Eilers5b01a892019-07-23 09:47:43 +0100904table QuantizedLstmInputParams {
905 inputToInputWeights:ConstTensor;
906 inputToForgetWeights:ConstTensor;
907 inputToCellWeights:ConstTensor;
908 inputToOutputWeights:ConstTensor;
909
910 recurrentToInputWeights:ConstTensor;
911 recurrentToForgetWeights:ConstTensor;
912 recurrentToCellWeights:ConstTensor;
913 recurrentToOutputWeights:ConstTensor;
914
915 inputGateBias:ConstTensor;
916 forgetGateBias:ConstTensor;
917 cellBias:ConstTensor;
918 outputGateBias:ConstTensor;
919}
920
Jan Eilers5b01a892019-07-23 09:47:43 +0100921table QuantizedLstmLayer {
922 base:LayerBase;
923 inputParams:QuantizedLstmInputParams;
924}
925
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000926table DequantizeLayer {
927 base:LayerBase;
928}
929
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100930table MergeLayer {
931 base:LayerBase;
932}
933
Sadik Armaganeff363d2019-04-05 15:25:46 +0100934table SwitchLayer {
935 base:LayerBase;
936}
937
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100938table PreluLayer {
939 base:LayerBase;
940}
941
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100942table TransposeConvolution2dLayer {
943 base:LayerBase;
944 descriptor:TransposeConvolution2dDescriptor;
945 weights:ConstTensor;
946 biases:ConstTensor;
947}
948
949table TransposeConvolution2dDescriptor {
950 padLeft:uint;
951 padRight:uint;
952 padTop:uint;
953 padBottom:uint;
954 strideX:uint;
955 strideY:uint;
956 biasEnabled:bool = false;
957 dataLayout:DataLayout = NCHW;
958}
959
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000960table TransposeLayer {
961 base:LayerBase;
962 descriptor:TransposeDescriptor;
963}
964
965table TransposeDescriptor {
966 dimMappings:[uint];
967}
968
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100969table ResizeLayer {
970 base:LayerBase;
971 descriptor:ResizeDescriptor;
972}
973
974table ResizeDescriptor {
975 targetHeight:uint;
976 targetWidth:uint;
977 method:ResizeMethod = NearestNeighbor;
978 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100979 alignCorners:bool;
980 halfPixelCenters:bool;
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100981}
982
Tracy Narine944fb502023-07-04 15:08:57 +0100983table ReverseV2Layer {
984 base:LayerBase;
985 descriptor:ReverseV2Descriptor;
986}
987
988table ReverseV2Descriptor {
989 axis:[int];
990}
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
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001059union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +00001060 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001061 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +00001062 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +00001063 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +00001064 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +00001065 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +00001066 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +00001067 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001068 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +00001069 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +00001070 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +00001071 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +00001072 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +00001073 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +00001074 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +00001075 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +00001076 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +00001077 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +00001078 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +00001079 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +00001080 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +00001081 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +00001082 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +00001083 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +00001084 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +00001085 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +00001086 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +00001087 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +00001088 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +00001089 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +00001090 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +00001091 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +00001092 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +00001093 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +00001094 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +01001095 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +00001096 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +01001097 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +01001098 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +01001099 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +01001100 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +01001101 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +01001102 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +01001103 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +01001104 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +01001105 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +01001106 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +01001107 ArgMinMaxLayer,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +01001108 SliceLayer,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +01001109 DepthToSpaceLayer,
Sadik Armagan26257852019-10-14 13:00:47 +01001110 InstanceNormalizationLayer,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +01001111 LogSoftmaxLayer,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001112 ComparisonLayer,
josh minor4a3c6102020-01-06 16:40:46 -06001113 StandInLayer,
Mike Kellyc9ea45a2020-02-28 18:11:58 +00001114 ElementwiseUnaryLayer,
James Conroy8d333182020-05-13 10:27:58 +01001115 TransposeLayer,
Keith Davis300ad562020-06-04 16:34:23 +01001116 QLstmLayer,
Finn Williams2605b232020-06-10 15:53:46 +01001117 FillLayer,
James Conroyaba90cd2020-11-06 16:28:18 +00001118 RankLayer,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001119 LogicalBinaryLayer,
mathad01b392e982021-04-07 12:07:30 +01001120 ReduceLayer,
Keith Davis3ae3f972021-05-21 16:33:48 +01001121 CastLayer,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001122 ShapeLayer,
1123 UnidirectionalSequenceLstmLayer,
Simon Obute51f67772021-09-03 15:50:13 +01001124 ChannelShuffleLayer,
Matthew Sloyanb63a3112021-09-08 13:05:51 +01001125 Convolution3dLayer,
Tamas Nyirid998a1c2021-11-05 14:55:33 +00001126 Pooling3dLayer,
Teresa Charlin6966bfa2022-04-25 17:14:50 +01001127 GatherNdLayer,
Samuel Yapa04f4a12022-08-19 11:14:38 +01001128 BatchMatMulLayer,
Mike Kelly3ec30772023-03-08 13:47:17 +00001129 ElementwiseBinaryLayer,
Tracy Narine944fb502023-07-04 15:08:57 +01001130 ReverseV2Layer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001131}
1132
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001133table AnyLayer {
1134 layer:Layer;
1135}
1136
Tee Jungaa920c52019-11-05 10:48:25 +00001137table FeatureCompatibilityVersions {
1138 bindingIdsScheme:uint = 0;
Jan Eilers53ef7952021-06-02 12:01:25 +01001139 weightsLayoutScheme:uint = 0;
Matthew Sloyan81beae32021-07-13 19:46:11 +01001140 constantTensorsAsInputs:uint = 0;
Tee Jungaa920c52019-11-05 10:48:25 +00001141}
1142
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001143// Root type for serialized data is the graph of the network
1144table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001145 layers:[AnyLayer];
Tee Jungaa920c52019-11-05 10:48:25 +00001146 inputIds:[int];
1147 outputIds:[int];
1148 featureVersions:FeatureCompatibilityVersions;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001149}
1150
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001151root_type SerializedGraph;