blob: 84149bd60d1ed705a2b53d1d6029c665464c3357 [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,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000187}
188
189// Base layer table to be used as part of other layers
190table LayerBase {
191 index:uint;
192 layerName:string;
193 layerType:LayerType;
194 inputSlots:[InputSlot];
195 outputSlots:[OutputSlot];
196}
197
198table BindableLayerBase {
199 base:LayerBase;
200 layerBindingId:int;
201}
202
203// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100204
josh minor4a3c6102020-01-06 16:40:46 -0600205/// @deprecated Use ElementwiseUnaryLayer instead
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100206table AbsLayer {
207 base:LayerBase;
208}
209
Mike Kellyaf484012019-02-20 16:53:11 +0000210table ActivationLayer {
211 base:LayerBase;
212 descriptor:ActivationDescriptor;
213}
214
215table ActivationDescriptor {
Tee Jung86bc3d82019-10-01 11:25:56 +0900216 activationFunction:ActivationFunction = Sigmoid;
Mike Kellyaf484012019-02-20 16:53:11 +0000217 a:float;
218 b:float;
219}
220
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000221table AdditionLayer {
222 base:LayerBase;
223}
224
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100225table ArgMinMaxLayer {
226 base:LayerBase;
227 descriptor:ArgMinMaxDescriptor;
228}
229
230table ArgMinMaxDescriptor{
Tee Jung86bc3d82019-10-01 11:25:56 +0900231 argMinMaxFunction:ArgMinMaxFunction;
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100232 axis:int;
233}
234
mathad01b392e982021-04-07 12:07:30 +0100235table CastLayer {
236 base:LayerBase;
237}
238
Simon Obute51f67772021-09-03 15:50:13 +0100239table ChannelShuffleLayer {
240 base:LayerBase;
241 descriptor:ChannelShuffleDescriptor;
242}
243
244table ChannelShuffleDescriptor {
245 axis:uint = 0;
246 numGroups:uint = 0;
247}
248
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100249enum ComparisonOperation : byte {
250 Equal = 0,
251 Greater = 1,
252 GreaterOrEqual = 2,
253 Less = 3,
254 LessOrEqual = 4,
255 NotEqual = 5
256}
257
258table ComparisonDescriptor {
259 operation:ComparisonOperation;
260}
261
262table ComparisonLayer {
263 base:LayerBase;
264 descriptor:ComparisonDescriptor;
265}
266
Conor Kennedy76277882019-02-26 08:29:54 +0000267table ConstantLayer {
268 base:LayerBase;
269 input:ConstTensor;
270}
271
Mike Kellya0766c32019-02-19 17:22:07 +0000272table Convolution2dLayer {
273 base:LayerBase;
274 descriptor:Convolution2dDescriptor;
275 weights:ConstTensor;
276 biases:ConstTensor;
277}
278
279table Convolution2dDescriptor {
280 padLeft:uint;
281 padRight:uint;
282 padTop:uint;
283 padBottom:uint;
284 strideX:uint;
285 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100286 dilationX:uint = 1;
287 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000288 biasEnabled:bool = false;
289 dataLayout:DataLayout = NCHW;
290}
291
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100292table Convolution3dLayer {
293 base:LayerBase;
294 descriptor:Convolution3dDescriptor;
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100295}
296
297table Convolution3dDescriptor {
298 padLeft:uint;
299 padRight:uint;
300 padTop:uint;
301 padBottom:uint;
302 padFront:uint;
303 padBack:uint;
304 strideX:uint;
305 strideY:uint;
306 strideZ:uint;
307 dilationX:uint = 1;
308 dilationY:uint = 1;
309 dilationZ:uint = 1;
310 biasEnabled:bool = false;
311 dataLayout:DataLayout = NDHWC;
312}
313
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100314table DepthToSpaceLayer {
315 base:LayerBase;
316 descriptor:DepthToSpaceDescriptor;
317}
318
319table DepthToSpaceDescriptor {
320 blockSize:uint;
321 dataLayout:DataLayout;
322}
323
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000324table DivisionLayer {
325 base:LayerBase;
326}
327
Mike Kelly3ec30772023-03-08 13:47:17 +0000328enum BinaryOperation : byte {
329 Add = 0,
330 Div = 1,
331 Maximum = 2,
332 Minimum = 3,
333 Mul = 4,
John Mcloughlin0ec00872023-05-15 17:03:49 +0100334 Sub = 5,
335 SqDiff = 6,
336 Power = 7
Mike Kelly3ec30772023-03-08 13:47:17 +0000337}
338
339table ElementwiseBinaryDescriptor {
340 operation:BinaryOperation;
341}
342
343table ElementwiseBinaryLayer {
344 base:LayerBase;
345 descriptor:ElementwiseBinaryDescriptor;
346}
347
josh minor4a3c6102020-01-06 16:40:46 -0600348enum UnaryOperation : byte {
349 Abs = 0,
350 Rsqrt = 1,
351 Sqrt = 2,
352 Exp = 3,
James Conroyaba90cd2020-11-06 16:28:18 +0000353 Neg = 4,
Teresa Charlin50de4fa2021-05-31 18:47:33 +0100354 LogicalNot = 5,
355 Log = 6,
Teresa Charlin93f0ad02023-03-23 15:28:02 +0000356 Sin = 7,
357 Ceil = 8
josh minor4a3c6102020-01-06 16:40:46 -0600358}
359
360table ElementwiseUnaryDescriptor {
361 operation:UnaryOperation;
362}
363
364table ElementwiseUnaryLayer {
365 base:LayerBase;
366 descriptor:ElementwiseUnaryDescriptor;
367}
368
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100369/// @deprecated Use ComparisonLayer instead
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000370table EqualLayer {
371 base:LayerBase;
372}
373
Keith Davis300ad562020-06-04 16:34:23 +0100374table FillLayer {
375 base:LayerBase;
376 descriptor:FillDescriptor;
377}
378
379table FillDescriptor {
380 value:float;
381}
382
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000383table FloorLayer{
384 base:LayerBase;
385}
386
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000387table FullyConnectedLayer {
388 base:LayerBase;
389 descriptor:FullyConnectedDescriptor;
Matthew Sloyan81beae32021-07-13 19:46:11 +0100390 weights:ConstTensor; // ConstTensors are now passed as inputs.
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000391 biases:ConstTensor;
392}
393
394table FullyConnectedDescriptor {
395 biasEnabled:bool = false;
396 transposeWeightsMatrix:bool = false;
Sadik Armaganf0a6dec2021-03-25 07:46:55 +0000397 constantWeights:bool = true;
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000398}
399
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000400table GatherLayer {
401 base:LayerBase;
Teresa Charlin52664732020-06-29 16:27:03 +0100402 descriptor:GatherDescriptor;
403}
404
405table GatherDescriptor {
406 axis:int = 0;
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000407}
408
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100409table GatherNdLayer {
410 base:LayerBase;
411}
412
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100413/// @deprecated Use ComparisonLayer instead
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000414table GreaterLayer {
415 base:LayerBase;
416}
417
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000418table InputLayer {
419 base:BindableLayerBase;
420}
421
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100422table InstanceNormalizationLayer {
423 base:LayerBase;
424 descriptor:InstanceNormalizationDescriptor;
425}
426
427table InstanceNormalizationDescriptor {
428 gamma:float;
429 beta:float;
430 eps:float;
431 dataLayout:DataLayout;
432}
433
Sadik Armagan26257852019-10-14 13:00:47 +0100434table LogSoftmaxLayer {
435 base:LayerBase;
436 descriptor:LogSoftmaxDescriptor;
437}
438
439table LogSoftmaxDescriptor {
440 beta:float = 1;
441 axis:int = -1;
442}
443
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000444table L2NormalizationLayer {
445 base:LayerBase;
446 descriptor:L2NormalizationDescriptor;
447}
448
449table L2NormalizationDescriptor {
450 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100451 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000452}
453
James Conroyaba90cd2020-11-06 16:28:18 +0000454enum LogicalBinaryOperation : byte {
455 LogicalAnd = 0,
456 LogicalOr = 1
457}
458
459table LogicalBinaryDescriptor {
460 operation:LogicalBinaryOperation;
461}
462
463table LogicalBinaryLayer {
464 base:LayerBase;
465 descriptor:LogicalBinaryDescriptor;
466}
467
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000468table MinimumLayer {
469 base:LayerBase;
470}
471
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000472table MaximumLayer {
473 base:LayerBase;
474}
475
Sadik Armagan5f450272019-02-12 14:31:45 +0000476table MultiplicationLayer {
477 base:LayerBase;
478}
479
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000480table Pooling2dLayer {
481 base:LayerBase;
482 descriptor:Pooling2dDescriptor;
483}
484
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000485table Pooling3dLayer {
486 base:LayerBase;
487 descriptor:Pooling3dDescriptor;
488}
489
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000490enum PoolingAlgorithm : byte {
491 Max = 0,
492 Average = 1,
493 L2 = 2
494}
495
496enum OutputShapeRounding : byte {
497 Floor = 0,
498 Ceiling = 1
499}
500
501enum PaddingMethod : byte {
502 IgnoreValue = 0,
503 Exclude = 1
504}
505
506table Pooling2dDescriptor {
507 poolType:PoolingAlgorithm;
508 padLeft:uint;
509 padRight:uint;
510 padTop:uint;
511 padBottom:uint;
512 poolWidth:uint;
513 poolHeight:uint;
514 strideX:uint;
515 strideY:uint;
516 outputShapeRounding:OutputShapeRounding;
517 paddingMethod:PaddingMethod;
518 dataLayout:DataLayout;
519}
520
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000521table Pooling3dDescriptor {
522 poolType:PoolingAlgorithm;
523 padLeft:uint;
524 padRight:uint;
525 padTop:uint;
526 padBottom:uint;
527 padFront:uint;
528 padBack:uint;
529 poolWidth:uint;
530 poolHeight:uint;
531 poolDepth:uint;
532 strideX:uint;
533 strideY:uint;
534 strideZ:uint;
535 outputShapeRounding:OutputShapeRounding;
536 paddingMethod:PaddingMethod;
537 dataLayout:DataLayout;
538}
539
Derek Lamberti87acb272019-03-27 16:51:31 +0000540table QuantizeLayer {
541 base:LayerBase;
542}
543
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000544table SoftmaxLayer {
545 base:LayerBase;
546 descriptor:SoftmaxDescriptor;
547}
548
549table SoftmaxDescriptor {
550 beta:float;
Sadik Armaganfd0cae32021-11-08 17:18:31 +0000551 axis:int = -1;
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000552}
553
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000554table DepthwiseConvolution2dLayer {
555 base:LayerBase;
556 descriptor:DepthwiseConvolution2dDescriptor;
557 weights:ConstTensor;
558 biases:ConstTensor;
559}
560
561table DepthwiseConvolution2dDescriptor {
562 padLeft:uint;
563 padRight:uint;
564 padTop:uint;
565 padBottom:uint;
566 strideX:uint;
567 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100568 dilationX:uint = 1;
569 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000570 biasEnabled:bool = false;
571 dataLayout:DataLayout = NCHW;
572}
573
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000574table OutputLayer {
575 base:BindableLayerBase;
576}
577
Saoirse Stewart263829c2019-02-19 15:54:14 +0000578table ReshapeLayer {
579 base:LayerBase;
580 descriptor:ReshapeDescriptor;
581}
582
583table ReshapeDescriptor {
Keith Davis3ae3f972021-05-21 16:33:48 +0100584 targetShape:[uint];
Saoirse Stewart263829c2019-02-19 15:54:14 +0000585}
586
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000587table PermuteLayer {
588 base:LayerBase;
589 descriptor:PermuteDescriptor;
590}
591
592table PermuteDescriptor {
593 dimMappings:[uint];
594}
595
Keith Davis3ae3f972021-05-21 16:33:48 +0100596table ShapeLayer {
597 base:LayerBase;
598}
599
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000600table SpaceToBatchNdLayer {
601 base:LayerBase;
602 descriptor:SpaceToBatchNdDescriptor;
603}
604
605table SpaceToBatchNdDescriptor {
606 blockShape:[uint];
607 padList:[uint];
608 dataLayout:DataLayout;
609}
610
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100611table SpaceToDepthLayer {
612 base:LayerBase;
613 descriptor:SpaceToDepthDescriptor;
614}
615
616table SpaceToDepthDescriptor {
617 blockSize:uint;
618 dataLayout:DataLayout;
619}
620
Conor Kennedyda1f9752019-03-01 14:37:12 +0000621table SubtractionLayer {
622 base:LayerBase;
623}
624
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000625table BatchToSpaceNdLayer {
626 base:LayerBase;
627 descriptor:BatchToSpaceNdDescriptor;
628}
629
630table BatchToSpaceNdDescriptor {
631 blockShape:[uint];
632 crops:[uint];
633 dataLayout:DataLayout;
634}
635
Nina Drozd57728782019-02-27 10:53:27 +0000636enum NormalizationAlgorithmChannel : byte {
637 Across = 0,
638 Within = 1
639}
640
641enum NormalizationAlgorithmMethod : byte {
642 LocalBrightness = 0,
643 LocalContrast = 1
644}
645
646table NormalizationLayer {
647 base:LayerBase;
648 descriptor:NormalizationDescriptor;
649}
650
651table NormalizationDescriptor {
652 normChannelType:NormalizationAlgorithmChannel = Across;
653 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
654 normSize:uint;
655 alpha:float;
656 beta:float;
657 k:float;
658 dataLayout:DataLayout = NCHW;
659}
660
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000661table MeanLayer {
662 base:LayerBase;
663 descriptor:MeanDescriptor;
664}
665
666table MeanDescriptor {
667 axis:[uint];
668 keepDims:bool = false;
669}
670
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000671table PadLayer {
672 base:LayerBase;
673 descriptor:PadDescriptor;
674}
675
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100676enum PaddingMode : byte {
677 Constant = 0,
678 Reflect = 1,
679 Symmetric = 2
680}
681
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000682table PadDescriptor {
683 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100684 padValue:float = 0;
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100685 paddingMode:PaddingMode = Constant;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000686}
687
josh minor4a3c6102020-01-06 16:40:46 -0600688/// @deprecated Use ElementwiseUnaryLayer instead
Sadik Armagan8b42a382019-03-01 14:24:49 +0000689table RsqrtLayer {
690 base:LayerBase;
691}
692
ruoyan018e7fa232019-02-28 15:09:07 +0000693table BatchNormalizationLayer {
694 base:LayerBase;
695 descriptor:BatchNormalizationDescriptor;
696 mean:ConstTensor;
697 variance:ConstTensor;
698 beta:ConstTensor;
699 gamma:ConstTensor;
700}
701
702table BatchNormalizationDescriptor {
703 eps:float;
704 dataLayout:DataLayout;
705}
706
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100707/// @deprecated Use ResizeLayer instead
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000708table ResizeBilinearLayer {
709 base:LayerBase;
710 descriptor:ResizeBilinearDescriptor;
711}
712
713table ResizeBilinearDescriptor {
714 targetWidth:uint;
715 targetHeight:uint;
716 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100717 alignCorners:bool;
718 halfPixelCenters:bool;
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000719}
720
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100721table SliceLayer {
722 base:LayerBase;
723 descriptor:SliceDescriptor;
724}
725
726table SliceDescriptor {
727 begin:[uint];
728 size:[uint];
729}
730
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000731table StridedSliceLayer {
732 base:LayerBase;
733 descriptor:StridedSliceDescriptor;
734}
735
736table StridedSliceDescriptor {
737 begin:[int];
738 end:[int];
739 stride:[int];
740 beginMask:int;
741 endMask:int;
742 shrinkAxisMask:int;
743 ellipsisMask:int;
744 newAxisMask:int;
745 dataLayout:DataLayout;
746}
747
Jim Flynne242f2d2019-05-22 14:24:13 +0100748table ConcatLayer {
749 base:LayerBase;
750 descriptor:OriginsDescriptor;
751}
752
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100753/// @deprecated Use ConcatLayer instead
Jim Flynnac25a1b2019-02-28 10:40:49 +0000754table MergerLayer {
755 base:LayerBase;
756 descriptor:OriginsDescriptor;
757}
758
759table UintVector {
760 data:[uint];
761}
762
763table OriginsDescriptor {
764 concatAxis:uint;
765 numViews:uint;
766 numDimensions:uint;
767 viewOrigins:[UintVector];
768}
769
Jim Flynn18ce3382019-03-08 11:08:30 +0000770table ViewsDescriptor {
771 origins:OriginsDescriptor;
772 viewSizes:[UintVector];
773}
774
775table SplitterLayer {
776 base:LayerBase;
777 descriptor:ViewsDescriptor;
778}
779
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000780table DetectionPostProcessLayer {
781 base:LayerBase;
782 descriptor:DetectionPostProcessDescriptor;
783 anchors:ConstTensor;
784}
785
786table DetectionPostProcessDescriptor {
787 maxDetections:uint;
788 maxClassesPerDetection:uint;
789 detectionsPerClass:uint;
790 nmsScoreThreshold:float;
791 nmsIouThreshold:float;
792 numClasses:uint;
793 useRegularNms:bool;
794 scaleX:float;
795 scaleY:float;
796 scaleW:float;
797 scaleH:float;
798}
799
Jim Flynn11af3752019-03-19 17:22:29 +0000800table LstmInputParams {
801 inputToForgetWeights:ConstTensor;
802 inputToCellWeights:ConstTensor;
803 inputToOutputWeights:ConstTensor;
804 recurrentToForgetWeights:ConstTensor;
805 recurrentToCellWeights:ConstTensor;
806 recurrentToOutputWeights:ConstTensor;
807 forgetGateBias:ConstTensor;
808 cellBias:ConstTensor;
809 outputGateBias:ConstTensor;
810
811 inputToInputWeights:ConstTensor;
812 recurrentToInputWeights:ConstTensor;
813 cellToInputWeights:ConstTensor;
814 inputGateBias:ConstTensor;
815
816 projectionWeights:ConstTensor;
817 projectionBias:ConstTensor;
818
819 cellToForgetWeights:ConstTensor;
820 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100821
822 inputLayerNormWeights:ConstTensor;
823 forgetLayerNormWeights:ConstTensor;
824 cellLayerNormWeights:ConstTensor;
825 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000826}
827
James Conroy8d333182020-05-13 10:27:58 +0100828table LstmDescriptor {
829 activationFunc:uint;
830 clippingThresCell:float;
831 clippingThresProj:float;
832 cifgEnabled:bool = true;
833 peepholeEnabled:bool = false;
834 projectionEnabled:bool = false;
835 layerNormEnabled:bool = false;
836}
837
838table LstmLayer {
839 base:LayerBase;
840 descriptor:LstmDescriptor;
841 inputParams:LstmInputParams;
842}
843
844table QLstmInputParams {
845 // Mandatory
846 inputToForgetWeights:ConstTensor;
847 inputToCellWeights:ConstTensor;
848 inputToOutputWeights:ConstTensor;
849
850 recurrentToForgetWeights:ConstTensor;
851 recurrentToCellWeights:ConstTensor;
852 recurrentToOutputWeights:ConstTensor;
853
854 forgetGateBias:ConstTensor;
855 cellBias:ConstTensor;
856 outputGateBias:ConstTensor;
857
858 // CIFG
859 inputToInputWeights:ConstTensor;
860 recurrentToInputWeights:ConstTensor;
861 inputGateBias:ConstTensor;
862
863 // Projection
864 projectionWeights:ConstTensor;
865 projectionBias:ConstTensor;
866
867 // Peephole
868 cellToInputWeights:ConstTensor;
869 cellToForgetWeights:ConstTensor;
870 cellToOutputWeights:ConstTensor;
871
872 // Layer norm
873 inputLayerNormWeights:ConstTensor;
874 forgetLayerNormWeights:ConstTensor;
875 cellLayerNormWeights:ConstTensor;
876 outputLayerNormWeights:ConstTensor;
877}
878
879table QLstmDescriptor {
880 cifgEnabled:bool = true;
881 peepholeEnabled:bool = false;
882 projectionEnabled:bool = false;
883 layerNormEnabled:bool = false;
884
885 cellClip:float;
886 projectionClip:float;
887
888 inputIntermediateScale:float;
889 forgetIntermediateScale:float;
890 cellIntermediateScale:float;
891 outputIntermediateScale:float;
892
893 hiddenStateZeroPoint:int;
894 hiddenStateScale:float;
895}
896
897table QLstmLayer {
898 base:LayerBase;
899 descriptor:QLstmDescriptor;
900 inputParams:QLstmInputParams;
901}
902
Jan Eilers5b01a892019-07-23 09:47:43 +0100903table QuantizedLstmInputParams {
904 inputToInputWeights:ConstTensor;
905 inputToForgetWeights:ConstTensor;
906 inputToCellWeights:ConstTensor;
907 inputToOutputWeights:ConstTensor;
908
909 recurrentToInputWeights:ConstTensor;
910 recurrentToForgetWeights:ConstTensor;
911 recurrentToCellWeights:ConstTensor;
912 recurrentToOutputWeights:ConstTensor;
913
914 inputGateBias:ConstTensor;
915 forgetGateBias:ConstTensor;
916 cellBias:ConstTensor;
917 outputGateBias:ConstTensor;
918}
919
Jan Eilers5b01a892019-07-23 09:47:43 +0100920table QuantizedLstmLayer {
921 base:LayerBase;
922 inputParams:QuantizedLstmInputParams;
923}
924
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000925table DequantizeLayer {
926 base:LayerBase;
927}
928
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100929table MergeLayer {
930 base:LayerBase;
931}
932
Sadik Armaganeff363d2019-04-05 15:25:46 +0100933table SwitchLayer {
934 base:LayerBase;
935}
936
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100937table PreluLayer {
938 base:LayerBase;
939}
940
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100941table TransposeConvolution2dLayer {
942 base:LayerBase;
943 descriptor:TransposeConvolution2dDescriptor;
944 weights:ConstTensor;
945 biases:ConstTensor;
946}
947
948table TransposeConvolution2dDescriptor {
949 padLeft:uint;
950 padRight:uint;
951 padTop:uint;
952 padBottom:uint;
953 strideX:uint;
954 strideY:uint;
955 biasEnabled:bool = false;
956 dataLayout:DataLayout = NCHW;
957}
958
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000959table TransposeLayer {
960 base:LayerBase;
961 descriptor:TransposeDescriptor;
962}
963
964table TransposeDescriptor {
965 dimMappings:[uint];
966}
967
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100968table ResizeLayer {
969 base:LayerBase;
970 descriptor:ResizeDescriptor;
971}
972
973table ResizeDescriptor {
974 targetHeight:uint;
975 targetWidth:uint;
976 method:ResizeMethod = NearestNeighbor;
977 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100978 alignCorners:bool;
979 halfPixelCenters:bool;
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100980}
981
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100982table StackLayer {
983 base:LayerBase;
984 descriptor:StackDescriptor;
985}
986
987table StackDescriptor {
988 axis:uint;
989 numInputs:uint;
990 inputShape:[uint];
991}
992
Aron Virginas-Tar85121a22019-10-23 10:41:35 +0100993table StandInDescriptor {
994 numInputs:uint;
995 numOutputs:uint;
996}
997
998table StandInLayer {
999 base:LayerBase;
1000 descriptor:StandInDescriptor;
1001}
1002
Finn Williams2605b232020-06-10 15:53:46 +01001003table RankLayer {
1004 base:LayerBase;
1005}
1006
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001007table ReduceLayer {
1008 base:LayerBase;
1009 descriptor:ReduceDescriptor;
1010}
1011
1012table ReduceDescriptor {
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001013 keepDims:bool = false;
1014 axis:[uint];
1015 reduceOperation:ReduceOperation = Sum;
1016}
1017
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001018table UnidirectionalSequenceLstmDescriptor {
1019 activationFunc:uint;
1020 clippingThresCell:float;
1021 clippingThresProj:float;
1022 cifgEnabled:bool = true;
1023 peepholeEnabled:bool = false;
1024 projectionEnabled:bool = false;
1025 layerNormEnabled:bool = false;
1026 timeMajor:bool = false;
1027}
1028
1029table UnidirectionalSequenceLstmLayer {
1030 base:LayerBase;
1031 descriptor:UnidirectionalSequenceLstmDescriptor;
1032 inputParams:LstmInputParams;
1033}
1034
Samuel Yapa04f4a12022-08-19 11:14:38 +01001035table BatchMatMulDescriptor {
1036 transposeX:bool = false;
1037 transposeY:bool = false;
1038 adjointX:bool = false;
1039 adjointY:bool = false;
1040 dataLayoutX:DataLayout = NCHW;
1041 dataLayoutY:DataLayout = NCHW;
1042}
1043
1044table BatchMatMulLayer {
1045 base:LayerBase;
1046 descriptor:BatchMatMulDescriptor;
1047}
1048
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001049union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +00001050 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001051 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +00001052 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +00001053 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +00001054 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +00001055 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +00001056 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +00001057 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001058 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +00001059 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +00001060 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +00001061 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +00001062 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +00001063 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +00001064 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +00001065 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +00001066 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +00001067 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +00001068 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +00001069 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +00001070 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +00001071 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +00001072 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +00001073 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +00001074 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +00001075 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +00001076 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +00001077 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +00001078 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +00001079 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +00001080 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +00001081 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +00001082 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +00001083 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +00001084 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +01001085 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +00001086 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +01001087 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +01001088 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +01001089 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +01001090 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +01001091 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +01001092 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +01001093 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +01001094 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +01001095 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +01001096 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +01001097 ArgMinMaxLayer,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +01001098 SliceLayer,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +01001099 DepthToSpaceLayer,
Sadik Armagan26257852019-10-14 13:00:47 +01001100 InstanceNormalizationLayer,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +01001101 LogSoftmaxLayer,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001102 ComparisonLayer,
josh minor4a3c6102020-01-06 16:40:46 -06001103 StandInLayer,
Mike Kellyc9ea45a2020-02-28 18:11:58 +00001104 ElementwiseUnaryLayer,
James Conroy8d333182020-05-13 10:27:58 +01001105 TransposeLayer,
Keith Davis300ad562020-06-04 16:34:23 +01001106 QLstmLayer,
Finn Williams2605b232020-06-10 15:53:46 +01001107 FillLayer,
James Conroyaba90cd2020-11-06 16:28:18 +00001108 RankLayer,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001109 LogicalBinaryLayer,
mathad01b392e982021-04-07 12:07:30 +01001110 ReduceLayer,
Keith Davis3ae3f972021-05-21 16:33:48 +01001111 CastLayer,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001112 ShapeLayer,
1113 UnidirectionalSequenceLstmLayer,
Simon Obute51f67772021-09-03 15:50:13 +01001114 ChannelShuffleLayer,
Matthew Sloyanb63a3112021-09-08 13:05:51 +01001115 Convolution3dLayer,
Tamas Nyirid998a1c2021-11-05 14:55:33 +00001116 Pooling3dLayer,
Teresa Charlin6966bfa2022-04-25 17:14:50 +01001117 GatherNdLayer,
Samuel Yapa04f4a12022-08-19 11:14:38 +01001118 BatchMatMulLayer,
Mike Kelly3ec30772023-03-08 13:47:17 +00001119 ElementwiseBinaryLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001120}
1121
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001122table AnyLayer {
1123 layer:Layer;
1124}
1125
Tee Jungaa920c52019-11-05 10:48:25 +00001126table FeatureCompatibilityVersions {
1127 bindingIdsScheme:uint = 0;
Jan Eilers53ef7952021-06-02 12:01:25 +01001128 weightsLayoutScheme:uint = 0;
Matthew Sloyan81beae32021-07-13 19:46:11 +01001129 constantTensorsAsInputs:uint = 0;
Tee Jungaa920c52019-11-05 10:48:25 +00001130}
1131
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001132// Root type for serialized data is the graph of the network
1133table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001134 layers:[AnyLayer];
Tee Jungaa920c52019-11-05 10:48:25 +00001135 inputIds:[int];
1136 outputIds:[int];
1137 featureVersions:FeatureCompatibilityVersions;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001138}
1139
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001140root_type SerializedGraph;