blob: 131970e4497422cdee78595cc8f22b3fa4e7ed0c [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,
Teresa Charlin077cddb2023-09-15 15:19:21 +010024 HardSwish = 11,
25 Gelu = 12
Mike Kellyaf484012019-02-20 16:53:11 +000026}
27
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +010028enum ArgMinMaxFunction : byte {
29 Min = 0,
30 Max = 1
31}
32
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000033enum DataType : byte {
34 Float16 = 0,
35 Float32 = 1,
Derek Lambertif90c56d2020-01-10 17:14:08 +000036 QuantisedAsymm8 = 2, // deprecated
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000037 Signed32 = 3,
Nattapat Chaimanowongcd5ac232019-03-19 12:26:36 +000038 Boolean = 4,
Derek Lambertif90c56d2020-01-10 17:14:08 +000039 QuantisedSymm16 = 5, // deprecated
40 QAsymmU8 = 6,
Francis Murtaghddb1d062020-03-10 13:51:45 +000041 QSymmS16 = 7,
Sadik Armagan1a84fe32020-03-27 15:56:57 +000042 QAsymmS8 = 8,
Mike Kelly1f140f72021-04-06 12:25:55 +010043 QSymmS8 = 9,
44 Signed64 = 10
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000045}
46
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000047enum DataLayout : byte {
48 NHWC = 0,
Matthew Sloyanb63a3112021-09-08 13:05:51 +010049 NCHW = 1,
Matthew Sloyan5d7b0a32021-10-18 13:07:49 +010050 NDHWC = 2,
51 NCDHW = 3
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000052}
53
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +000054enum ReduceOperation: byte {
55 Sum = 0,
56 Max = 1,
57 Mean = 2,
Teresa Charlin4e3e8312021-08-05 12:34:37 +010058 Min = 3,
59 Prod = 4
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +000060}
61
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +010062enum ResizeMethod: byte {
63 NearestNeighbor = 0,
64 Bilinear = 1,
65}
66
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000067table TensorInfo {
68 dimensions:[uint];
69 dataType:DataType;
Sadik Armagan1a84fe32020-03-27 15:56:57 +000070 quantizationScale:float = 1.0; // @deprecated Use quantizationScales instead
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000071 quantizationOffset:int = 0;
Sadik Armagan1a84fe32020-03-27 15:56:57 +000072 quantizationScales:[float];
73 quantizationDim:uint;
Finn Williams2605b232020-06-10 15:53:46 +010074 dimensionality:uint = 1;
Colm Donelan800b2812021-02-12 12:43:35 +000075 dimensionSpecificity:[bool];
Matthew Sloyan81beae32021-07-13 19:46:11 +010076 isConstant:bool = false;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000077}
78
79struct Connection {
80 sourceLayerIndex:uint;
81 outputSlotIndex:uint;
82}
83
84table ByteData {
85 data:[byte];
86}
87
88table ShortData {
89 data:[short];
90}
91
92table IntData {
93 data:[int];
94}
95
96table LongData {
97 data:[long];
98}
99
100union ConstTensorData { ByteData, ShortData, IntData, LongData }
101
102table ConstTensor {
103 info:TensorInfo;
104 data:ConstTensorData;
105}
106
107table InputSlot {
108 index:uint;
109 connection:Connection;
Mike Kelly4cc341c2023-07-07 15:43:06 +0100110 isOverridden:bool;
111 overriddenTensorInfo:TensorInfo;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000112}
113
114table OutputSlot {
115 index:uint;
116 tensorInfo:TensorInfo;
117}
118
119enum LayerType : uint {
120 Addition = 0,
121 Input = 1,
Sadik Armagan5f450272019-02-12 14:31:45 +0000122 Multiplication = 2,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000123 Output = 3,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000124 Pooling2d = 4,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000125 Reshape = 5,
Mike Kellya0766c32019-02-19 17:22:07 +0000126 Softmax = 6,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000127 Convolution2d = 7,
Mike Kellyaf484012019-02-20 16:53:11 +0000128 DepthwiseConvolution2d = 8,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000129 Activation = 9,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000130 Permute = 10,
Conor Kennedy76277882019-02-26 08:29:54 +0000131 FullyConnected = 11,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000132 Constant = 12,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000133 SpaceToBatchNd = 13,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000134 BatchToSpaceNd = 14,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000135 Division = 15,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000136 Minimum = 16,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000137 Equal = 17,
Nina Drozd57728782019-02-27 10:53:27 +0000138 Maximum = 18,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000139 Normalization = 19,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000140 Pad = 20,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000141 Rsqrt = 21,
ruoyan018e7fa232019-02-28 15:09:07 +0000142 Floor = 22,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000143 BatchNormalization = 23,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000144 Greater = 24,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000145 ResizeBilinear = 25,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000146 Subtraction = 26,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000147 StridedSlice = 27,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000148 Gather = 28,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000149 Mean = 29,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000150 Merger = 30,
Jim Flynn18ce3382019-03-08 11:08:30 +0000151 L2Normalization = 31,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000152 Splitter = 32,
Jim Flynn11af3752019-03-19 17:22:29 +0000153 DetectionPostProcess = 33,
Derek Lamberti87acb272019-03-27 16:51:31 +0000154 Lstm = 34,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000155 Quantize = 35,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100156 Dequantize = 36,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100157 Merge = 37,
Jim Flynne242f2d2019-05-22 14:24:13 +0100158 Switch = 38,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100159 Concat = 39,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100160 SpaceToDepth = 40,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100161 Prelu = 41,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100162 TransposeConvolution2d = 42,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100163 Resize = 43,
Jan Eilers5b01a892019-07-23 09:47:43 +0100164 Stack = 44,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100165 QuantizedLstm = 45,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100166 Abs = 46,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100167 ArgMinMax = 47,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100168 Slice = 48,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100169 DepthToSpace = 49,
Sadik Armagan26257852019-10-14 13:00:47 +0100170 InstanceNormalization = 50,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100171 LogSoftmax = 51,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +0100172 Comparison = 52,
josh minor4a3c6102020-01-06 16:40:46 -0600173 StandIn = 53,
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000174 ElementwiseUnary = 54,
James Conroy8d333182020-05-13 10:27:58 +0100175 Transpose = 55,
Keith Davis300ad562020-06-04 16:34:23 +0100176 QLstm = 56,
Finn Williams2605b232020-06-10 15:53:46 +0100177 Fill = 57,
James Conroyaba90cd2020-11-06 16:28:18 +0000178 Rank = 58,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +0000179 LogicalBinary = 59,
mathad01b392e982021-04-07 12:07:30 +0100180 Reduce = 60,
Keith Davis3ae3f972021-05-21 16:33:48 +0100181 Cast = 61,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +0100182 Shape = 62,
183 UnidirectionalSequenceLstm = 63,
Simon Obute51f67772021-09-03 15:50:13 +0100184 ChannelShuffle = 64,
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100185 Convolution3d = 65,
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000186 Pooling3d = 66,
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100187 GatherNd = 67,
Samuel Yapa04f4a12022-08-19 11:14:38 +0100188 BatchMatMul = 68,
Mike Kelly3ec30772023-03-08 13:47:17 +0000189 ElementwiseBinary = 69,
Tracy Narine944fb502023-07-04 15:08:57 +0100190 ReverseV2 = 70,
David Monahan616b22f2023-07-25 12:08:10 +0100191 Tile = 71,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000192}
193
194// Base layer table to be used as part of other layers
195table LayerBase {
196 index:uint;
197 layerName:string;
198 layerType:LayerType;
199 inputSlots:[InputSlot];
200 outputSlots:[OutputSlot];
201}
202
203table BindableLayerBase {
204 base:LayerBase;
205 layerBindingId:int;
206}
207
208// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100209
josh minor4a3c6102020-01-06 16:40:46 -0600210/// @deprecated Use ElementwiseUnaryLayer instead
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100211table AbsLayer {
212 base:LayerBase;
213}
214
Mike Kellyaf484012019-02-20 16:53:11 +0000215table ActivationLayer {
216 base:LayerBase;
217 descriptor:ActivationDescriptor;
218}
219
220table ActivationDescriptor {
Tee Jung86bc3d82019-10-01 11:25:56 +0900221 activationFunction:ActivationFunction = Sigmoid;
Mike Kellyaf484012019-02-20 16:53:11 +0000222 a:float;
223 b:float;
224}
225
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000226table AdditionLayer {
227 base:LayerBase;
228}
229
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100230table ArgMinMaxLayer {
231 base:LayerBase;
232 descriptor:ArgMinMaxDescriptor;
233}
234
235table ArgMinMaxDescriptor{
Tee Jung86bc3d82019-10-01 11:25:56 +0900236 argMinMaxFunction:ArgMinMaxFunction;
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100237 axis:int;
238}
239
mathad01b392e982021-04-07 12:07:30 +0100240table CastLayer {
241 base:LayerBase;
242}
243
Simon Obute51f67772021-09-03 15:50:13 +0100244table ChannelShuffleLayer {
245 base:LayerBase;
246 descriptor:ChannelShuffleDescriptor;
247}
248
249table ChannelShuffleDescriptor {
250 axis:uint = 0;
251 numGroups:uint = 0;
252}
253
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100254enum ComparisonOperation : byte {
255 Equal = 0,
256 Greater = 1,
257 GreaterOrEqual = 2,
258 Less = 3,
259 LessOrEqual = 4,
260 NotEqual = 5
261}
262
263table ComparisonDescriptor {
264 operation:ComparisonOperation;
265}
266
267table ComparisonLayer {
268 base:LayerBase;
269 descriptor:ComparisonDescriptor;
270}
271
Conor Kennedy76277882019-02-26 08:29:54 +0000272table ConstantLayer {
273 base:LayerBase;
274 input:ConstTensor;
275}
276
Mike Kellya0766c32019-02-19 17:22:07 +0000277table Convolution2dLayer {
278 base:LayerBase;
279 descriptor:Convolution2dDescriptor;
280 weights:ConstTensor;
281 biases:ConstTensor;
282}
283
284table Convolution2dDescriptor {
285 padLeft:uint;
286 padRight:uint;
287 padTop:uint;
288 padBottom:uint;
289 strideX:uint;
290 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100291 dilationX:uint = 1;
292 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000293 biasEnabled:bool = false;
294 dataLayout:DataLayout = NCHW;
295}
296
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100297table Convolution3dLayer {
298 base:LayerBase;
299 descriptor:Convolution3dDescriptor;
Matthew Sloyanb63a3112021-09-08 13:05:51 +0100300}
301
302table Convolution3dDescriptor {
303 padLeft:uint;
304 padRight:uint;
305 padTop:uint;
306 padBottom:uint;
307 padFront:uint;
308 padBack:uint;
309 strideX:uint;
310 strideY:uint;
311 strideZ:uint;
312 dilationX:uint = 1;
313 dilationY:uint = 1;
314 dilationZ:uint = 1;
315 biasEnabled:bool = false;
316 dataLayout:DataLayout = NDHWC;
317}
318
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100319table DepthToSpaceLayer {
320 base:LayerBase;
321 descriptor:DepthToSpaceDescriptor;
322}
323
324table DepthToSpaceDescriptor {
325 blockSize:uint;
326 dataLayout:DataLayout;
327}
328
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000329table DivisionLayer {
330 base:LayerBase;
331}
332
Mike Kelly3ec30772023-03-08 13:47:17 +0000333enum BinaryOperation : byte {
334 Add = 0,
335 Div = 1,
336 Maximum = 2,
337 Minimum = 3,
338 Mul = 4,
John Mcloughlin0ec00872023-05-15 17:03:49 +0100339 Sub = 5,
340 SqDiff = 6,
341 Power = 7
Mike Kelly3ec30772023-03-08 13:47:17 +0000342}
343
344table ElementwiseBinaryDescriptor {
345 operation:BinaryOperation;
346}
347
348table ElementwiseBinaryLayer {
349 base:LayerBase;
350 descriptor:ElementwiseBinaryDescriptor;
351}
352
josh minor4a3c6102020-01-06 16:40:46 -0600353enum UnaryOperation : byte {
354 Abs = 0,
355 Rsqrt = 1,
356 Sqrt = 2,
357 Exp = 3,
James Conroyaba90cd2020-11-06 16:28:18 +0000358 Neg = 4,
Teresa Charlin50de4fa2021-05-31 18:47:33 +0100359 LogicalNot = 5,
360 Log = 6,
Teresa Charlin93f0ad02023-03-23 15:28:02 +0000361 Sin = 7,
362 Ceil = 8
josh minor4a3c6102020-01-06 16:40:46 -0600363}
364
365table ElementwiseUnaryDescriptor {
366 operation:UnaryOperation;
367}
368
369table ElementwiseUnaryLayer {
370 base:LayerBase;
371 descriptor:ElementwiseUnaryDescriptor;
372}
373
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100374/// @deprecated Use ComparisonLayer instead
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000375table EqualLayer {
376 base:LayerBase;
377}
378
Keith Davis300ad562020-06-04 16:34:23 +0100379table FillLayer {
380 base:LayerBase;
381 descriptor:FillDescriptor;
382}
383
384table FillDescriptor {
385 value:float;
386}
387
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000388table FloorLayer{
389 base:LayerBase;
390}
391
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000392table FullyConnectedLayer {
393 base:LayerBase;
394 descriptor:FullyConnectedDescriptor;
Matthew Sloyan81beae32021-07-13 19:46:11 +0100395 weights:ConstTensor; // ConstTensors are now passed as inputs.
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000396 biases:ConstTensor;
397}
398
399table FullyConnectedDescriptor {
400 biasEnabled:bool = false;
401 transposeWeightsMatrix:bool = false;
Sadik Armaganf0a6dec2021-03-25 07:46:55 +0000402 constantWeights:bool = true;
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000403}
404
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000405table GatherLayer {
406 base:LayerBase;
Teresa Charlin52664732020-06-29 16:27:03 +0100407 descriptor:GatherDescriptor;
408}
409
410table GatherDescriptor {
411 axis:int = 0;
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000412}
413
Teresa Charlin6966bfa2022-04-25 17:14:50 +0100414table GatherNdLayer {
415 base:LayerBase;
416}
417
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100418/// @deprecated Use ComparisonLayer instead
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000419table GreaterLayer {
420 base:LayerBase;
421}
422
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000423table InputLayer {
424 base:BindableLayerBase;
425}
426
Aron Virginas-Tar781ced92019-10-03 11:15:39 +0100427table InstanceNormalizationLayer {
428 base:LayerBase;
429 descriptor:InstanceNormalizationDescriptor;
430}
431
432table InstanceNormalizationDescriptor {
433 gamma:float;
434 beta:float;
435 eps:float;
436 dataLayout:DataLayout;
437}
438
Sadik Armagan26257852019-10-14 13:00:47 +0100439table LogSoftmaxLayer {
440 base:LayerBase;
441 descriptor:LogSoftmaxDescriptor;
442}
443
444table LogSoftmaxDescriptor {
445 beta:float = 1;
446 axis:int = -1;
447}
448
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000449table L2NormalizationLayer {
450 base:LayerBase;
451 descriptor:L2NormalizationDescriptor;
452}
453
454table L2NormalizationDescriptor {
455 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100456 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000457}
458
James Conroyaba90cd2020-11-06 16:28:18 +0000459enum LogicalBinaryOperation : byte {
460 LogicalAnd = 0,
461 LogicalOr = 1
462}
463
464table LogicalBinaryDescriptor {
465 operation:LogicalBinaryOperation;
466}
467
468table LogicalBinaryLayer {
469 base:LayerBase;
470 descriptor:LogicalBinaryDescriptor;
471}
472
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000473table MinimumLayer {
474 base:LayerBase;
475}
476
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000477table MaximumLayer {
478 base:LayerBase;
479}
480
Sadik Armagan5f450272019-02-12 14:31:45 +0000481table MultiplicationLayer {
482 base:LayerBase;
483}
484
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000485table Pooling2dLayer {
486 base:LayerBase;
487 descriptor:Pooling2dDescriptor;
488}
489
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000490table Pooling3dLayer {
491 base:LayerBase;
492 descriptor:Pooling3dDescriptor;
493}
494
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000495enum PoolingAlgorithm : byte {
496 Max = 0,
497 Average = 1,
498 L2 = 2
499}
500
501enum OutputShapeRounding : byte {
502 Floor = 0,
503 Ceiling = 1
504}
505
506enum PaddingMethod : byte {
507 IgnoreValue = 0,
508 Exclude = 1
509}
510
511table Pooling2dDescriptor {
512 poolType:PoolingAlgorithm;
513 padLeft:uint;
514 padRight:uint;
515 padTop:uint;
516 padBottom:uint;
517 poolWidth:uint;
518 poolHeight:uint;
519 strideX:uint;
520 strideY:uint;
521 outputShapeRounding:OutputShapeRounding;
522 paddingMethod:PaddingMethod;
523 dataLayout:DataLayout;
524}
525
Tamas Nyirid998a1c2021-11-05 14:55:33 +0000526table Pooling3dDescriptor {
527 poolType:PoolingAlgorithm;
528 padLeft:uint;
529 padRight:uint;
530 padTop:uint;
531 padBottom:uint;
532 padFront:uint;
533 padBack:uint;
534 poolWidth:uint;
535 poolHeight:uint;
536 poolDepth:uint;
537 strideX:uint;
538 strideY:uint;
539 strideZ:uint;
540 outputShapeRounding:OutputShapeRounding;
541 paddingMethod:PaddingMethod;
542 dataLayout:DataLayout;
543}
544
Derek Lamberti87acb272019-03-27 16:51:31 +0000545table QuantizeLayer {
546 base:LayerBase;
547}
548
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000549table SoftmaxLayer {
550 base:LayerBase;
551 descriptor:SoftmaxDescriptor;
552}
553
554table SoftmaxDescriptor {
555 beta:float;
Sadik Armaganfd0cae32021-11-08 17:18:31 +0000556 axis:int = -1;
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000557}
558
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000559table DepthwiseConvolution2dLayer {
560 base:LayerBase;
561 descriptor:DepthwiseConvolution2dDescriptor;
562 weights:ConstTensor;
563 biases:ConstTensor;
564}
565
566table DepthwiseConvolution2dDescriptor {
567 padLeft:uint;
568 padRight:uint;
569 padTop:uint;
570 padBottom:uint;
571 strideX:uint;
572 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100573 dilationX:uint = 1;
574 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000575 biasEnabled:bool = false;
576 dataLayout:DataLayout = NCHW;
577}
578
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000579table OutputLayer {
580 base:BindableLayerBase;
581}
582
Saoirse Stewart263829c2019-02-19 15:54:14 +0000583table ReshapeLayer {
584 base:LayerBase;
585 descriptor:ReshapeDescriptor;
586}
587
588table ReshapeDescriptor {
Keith Davis3ae3f972021-05-21 16:33:48 +0100589 targetShape:[uint];
Saoirse Stewart263829c2019-02-19 15:54:14 +0000590}
591
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000592table PermuteLayer {
593 base:LayerBase;
594 descriptor:PermuteDescriptor;
595}
596
597table PermuteDescriptor {
598 dimMappings:[uint];
599}
600
Keith Davis3ae3f972021-05-21 16:33:48 +0100601table ShapeLayer {
602 base:LayerBase;
603}
604
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000605table SpaceToBatchNdLayer {
606 base:LayerBase;
607 descriptor:SpaceToBatchNdDescriptor;
608}
609
610table SpaceToBatchNdDescriptor {
611 blockShape:[uint];
612 padList:[uint];
613 dataLayout:DataLayout;
614}
615
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100616table SpaceToDepthLayer {
617 base:LayerBase;
618 descriptor:SpaceToDepthDescriptor;
619}
620
621table SpaceToDepthDescriptor {
622 blockSize:uint;
623 dataLayout:DataLayout;
624}
625
Conor Kennedyda1f9752019-03-01 14:37:12 +0000626table SubtractionLayer {
627 base:LayerBase;
628}
629
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000630table BatchToSpaceNdLayer {
631 base:LayerBase;
632 descriptor:BatchToSpaceNdDescriptor;
633}
634
635table BatchToSpaceNdDescriptor {
636 blockShape:[uint];
637 crops:[uint];
638 dataLayout:DataLayout;
639}
640
Nina Drozd57728782019-02-27 10:53:27 +0000641enum NormalizationAlgorithmChannel : byte {
642 Across = 0,
643 Within = 1
644}
645
646enum NormalizationAlgorithmMethod : byte {
647 LocalBrightness = 0,
648 LocalContrast = 1
649}
650
651table NormalizationLayer {
652 base:LayerBase;
653 descriptor:NormalizationDescriptor;
654}
655
656table NormalizationDescriptor {
657 normChannelType:NormalizationAlgorithmChannel = Across;
658 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
659 normSize:uint;
660 alpha:float;
661 beta:float;
662 k:float;
663 dataLayout:DataLayout = NCHW;
664}
665
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000666table MeanLayer {
667 base:LayerBase;
668 descriptor:MeanDescriptor;
669}
670
671table MeanDescriptor {
672 axis:[uint];
673 keepDims:bool = false;
674}
675
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000676table PadLayer {
677 base:LayerBase;
678 descriptor:PadDescriptor;
679}
680
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100681enum PaddingMode : byte {
682 Constant = 0,
683 Reflect = 1,
684 Symmetric = 2
685}
686
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000687table PadDescriptor {
688 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100689 padValue:float = 0;
Matthew Sloyan2e5d0b22021-10-21 14:05:31 +0100690 paddingMode:PaddingMode = Constant;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000691}
692
josh minor4a3c6102020-01-06 16:40:46 -0600693/// @deprecated Use ElementwiseUnaryLayer instead
Sadik Armagan8b42a382019-03-01 14:24:49 +0000694table RsqrtLayer {
695 base:LayerBase;
696}
697
ruoyan018e7fa232019-02-28 15:09:07 +0000698table BatchNormalizationLayer {
699 base:LayerBase;
700 descriptor:BatchNormalizationDescriptor;
701 mean:ConstTensor;
702 variance:ConstTensor;
703 beta:ConstTensor;
704 gamma:ConstTensor;
705}
706
707table BatchNormalizationDescriptor {
708 eps:float;
709 dataLayout:DataLayout;
710}
711
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100712/// @deprecated Use ResizeLayer instead
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000713table ResizeBilinearLayer {
714 base:LayerBase;
715 descriptor:ResizeBilinearDescriptor;
716}
717
718table ResizeBilinearDescriptor {
719 targetWidth:uint;
720 targetHeight:uint;
721 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100722 alignCorners:bool;
723 halfPixelCenters:bool;
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000724}
725
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100726table SliceLayer {
727 base:LayerBase;
728 descriptor:SliceDescriptor;
729}
730
731table SliceDescriptor {
732 begin:[uint];
733 size:[uint];
734}
735
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000736table StridedSliceLayer {
737 base:LayerBase;
738 descriptor:StridedSliceDescriptor;
739}
740
741table StridedSliceDescriptor {
742 begin:[int];
743 end:[int];
744 stride:[int];
745 beginMask:int;
746 endMask:int;
747 shrinkAxisMask:int;
748 ellipsisMask:int;
749 newAxisMask:int;
750 dataLayout:DataLayout;
751}
752
Jim Flynne242f2d2019-05-22 14:24:13 +0100753table ConcatLayer {
754 base:LayerBase;
755 descriptor:OriginsDescriptor;
756}
757
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +0100758/// @deprecated Use ConcatLayer instead
Jim Flynnac25a1b2019-02-28 10:40:49 +0000759table MergerLayer {
760 base:LayerBase;
761 descriptor:OriginsDescriptor;
762}
763
764table UintVector {
765 data:[uint];
766}
767
768table OriginsDescriptor {
769 concatAxis:uint;
770 numViews:uint;
771 numDimensions:uint;
772 viewOrigins:[UintVector];
773}
774
Jim Flynn18ce3382019-03-08 11:08:30 +0000775table ViewsDescriptor {
776 origins:OriginsDescriptor;
777 viewSizes:[UintVector];
Mike Kellyfca59162023-08-08 12:00:28 +0100778 hasAxis:bool;
779 axis:int;
Jim Flynn18ce3382019-03-08 11:08:30 +0000780}
781
782table SplitterLayer {
783 base:LayerBase;
784 descriptor:ViewsDescriptor;
785}
786
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000787table DetectionPostProcessLayer {
788 base:LayerBase;
789 descriptor:DetectionPostProcessDescriptor;
790 anchors:ConstTensor;
791}
792
793table DetectionPostProcessDescriptor {
794 maxDetections:uint;
795 maxClassesPerDetection:uint;
796 detectionsPerClass:uint;
797 nmsScoreThreshold:float;
798 nmsIouThreshold:float;
799 numClasses:uint;
800 useRegularNms:bool;
801 scaleX:float;
802 scaleY:float;
803 scaleW:float;
804 scaleH:float;
805}
806
Jim Flynn11af3752019-03-19 17:22:29 +0000807table LstmInputParams {
808 inputToForgetWeights:ConstTensor;
809 inputToCellWeights:ConstTensor;
810 inputToOutputWeights:ConstTensor;
811 recurrentToForgetWeights:ConstTensor;
812 recurrentToCellWeights:ConstTensor;
813 recurrentToOutputWeights:ConstTensor;
814 forgetGateBias:ConstTensor;
815 cellBias:ConstTensor;
816 outputGateBias:ConstTensor;
817
818 inputToInputWeights:ConstTensor;
819 recurrentToInputWeights:ConstTensor;
820 cellToInputWeights:ConstTensor;
821 inputGateBias:ConstTensor;
822
823 projectionWeights:ConstTensor;
824 projectionBias:ConstTensor;
825
826 cellToForgetWeights:ConstTensor;
827 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100828
829 inputLayerNormWeights:ConstTensor;
830 forgetLayerNormWeights:ConstTensor;
831 cellLayerNormWeights:ConstTensor;
832 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000833}
834
James Conroy8d333182020-05-13 10:27:58 +0100835table LstmDescriptor {
836 activationFunc:uint;
837 clippingThresCell:float;
838 clippingThresProj:float;
839 cifgEnabled:bool = true;
840 peepholeEnabled:bool = false;
841 projectionEnabled:bool = false;
842 layerNormEnabled:bool = false;
843}
844
845table LstmLayer {
846 base:LayerBase;
847 descriptor:LstmDescriptor;
848 inputParams:LstmInputParams;
849}
850
851table QLstmInputParams {
852 // Mandatory
853 inputToForgetWeights:ConstTensor;
854 inputToCellWeights:ConstTensor;
855 inputToOutputWeights:ConstTensor;
856
857 recurrentToForgetWeights:ConstTensor;
858 recurrentToCellWeights:ConstTensor;
859 recurrentToOutputWeights:ConstTensor;
860
861 forgetGateBias:ConstTensor;
862 cellBias:ConstTensor;
863 outputGateBias:ConstTensor;
864
865 // CIFG
866 inputToInputWeights:ConstTensor;
867 recurrentToInputWeights:ConstTensor;
868 inputGateBias:ConstTensor;
869
870 // Projection
871 projectionWeights:ConstTensor;
872 projectionBias:ConstTensor;
873
874 // Peephole
875 cellToInputWeights:ConstTensor;
876 cellToForgetWeights:ConstTensor;
877 cellToOutputWeights:ConstTensor;
878
879 // Layer norm
880 inputLayerNormWeights:ConstTensor;
881 forgetLayerNormWeights:ConstTensor;
882 cellLayerNormWeights:ConstTensor;
883 outputLayerNormWeights:ConstTensor;
884}
885
886table QLstmDescriptor {
887 cifgEnabled:bool = true;
888 peepholeEnabled:bool = false;
889 projectionEnabled:bool = false;
890 layerNormEnabled:bool = false;
891
892 cellClip:float;
893 projectionClip:float;
894
895 inputIntermediateScale:float;
896 forgetIntermediateScale:float;
897 cellIntermediateScale:float;
898 outputIntermediateScale:float;
899
900 hiddenStateZeroPoint:int;
901 hiddenStateScale:float;
902}
903
904table QLstmLayer {
905 base:LayerBase;
906 descriptor:QLstmDescriptor;
907 inputParams:QLstmInputParams;
908}
909
Jan Eilers5b01a892019-07-23 09:47:43 +0100910table QuantizedLstmInputParams {
911 inputToInputWeights:ConstTensor;
912 inputToForgetWeights:ConstTensor;
913 inputToCellWeights:ConstTensor;
914 inputToOutputWeights:ConstTensor;
915
916 recurrentToInputWeights:ConstTensor;
917 recurrentToForgetWeights:ConstTensor;
918 recurrentToCellWeights:ConstTensor;
919 recurrentToOutputWeights:ConstTensor;
920
921 inputGateBias:ConstTensor;
922 forgetGateBias:ConstTensor;
923 cellBias:ConstTensor;
924 outputGateBias:ConstTensor;
925}
926
Jan Eilers5b01a892019-07-23 09:47:43 +0100927table QuantizedLstmLayer {
928 base:LayerBase;
929 inputParams:QuantizedLstmInputParams;
930}
931
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000932table DequantizeLayer {
933 base:LayerBase;
934}
935
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100936table MergeLayer {
937 base:LayerBase;
938}
939
Sadik Armaganeff363d2019-04-05 15:25:46 +0100940table SwitchLayer {
941 base:LayerBase;
942}
943
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100944table PreluLayer {
945 base:LayerBase;
946}
947
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100948table TransposeConvolution2dLayer {
949 base:LayerBase;
950 descriptor:TransposeConvolution2dDescriptor;
951 weights:ConstTensor;
952 biases:ConstTensor;
953}
954
955table TransposeConvolution2dDescriptor {
956 padLeft:uint;
957 padRight:uint;
958 padTop:uint;
959 padBottom:uint;
960 strideX:uint;
961 strideY:uint;
962 biasEnabled:bool = false;
963 dataLayout:DataLayout = NCHW;
964}
965
Mike Kellyc9ea45a2020-02-28 18:11:58 +0000966table TransposeLayer {
967 base:LayerBase;
968 descriptor:TransposeDescriptor;
969}
970
971table TransposeDescriptor {
972 dimMappings:[uint];
973}
974
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100975table ResizeLayer {
976 base:LayerBase;
977 descriptor:ResizeDescriptor;
978}
979
980table ResizeDescriptor {
981 targetHeight:uint;
982 targetWidth:uint;
983 method:ResizeMethod = NearestNeighbor;
984 dataLayout:DataLayout;
David Monahan4a0c9b92020-05-30 09:48:39 +0100985 alignCorners:bool;
986 halfPixelCenters:bool;
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100987}
988
Tracy Narine944fb502023-07-04 15:08:57 +0100989table ReverseV2Layer {
990 base:LayerBase;
Tracy Narine944fb502023-07-04 15:08:57 +0100991}
992
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100993table StackLayer {
994 base:LayerBase;
995 descriptor:StackDescriptor;
996}
997
998table StackDescriptor {
999 axis:uint;
1000 numInputs:uint;
1001 inputShape:[uint];
1002}
1003
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001004table StandInDescriptor {
1005 numInputs:uint;
1006 numOutputs:uint;
1007}
1008
1009table StandInLayer {
1010 base:LayerBase;
1011 descriptor:StandInDescriptor;
1012}
1013
Finn Williams2605b232020-06-10 15:53:46 +01001014table RankLayer {
1015 base:LayerBase;
1016}
1017
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001018table ReduceLayer {
1019 base:LayerBase;
1020 descriptor:ReduceDescriptor;
1021}
1022
1023table ReduceDescriptor {
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001024 keepDims:bool = false;
1025 axis:[uint];
1026 reduceOperation:ReduceOperation = Sum;
1027}
1028
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001029table UnidirectionalSequenceLstmDescriptor {
1030 activationFunc:uint;
1031 clippingThresCell:float;
1032 clippingThresProj:float;
1033 cifgEnabled:bool = true;
1034 peepholeEnabled:bool = false;
1035 projectionEnabled:bool = false;
1036 layerNormEnabled:bool = false;
1037 timeMajor:bool = false;
1038}
1039
1040table UnidirectionalSequenceLstmLayer {
1041 base:LayerBase;
1042 descriptor:UnidirectionalSequenceLstmDescriptor;
1043 inputParams:LstmInputParams;
1044}
1045
Samuel Yapa04f4a12022-08-19 11:14:38 +01001046table BatchMatMulDescriptor {
1047 transposeX:bool = false;
1048 transposeY:bool = false;
1049 adjointX:bool = false;
1050 adjointY:bool = false;
1051 dataLayoutX:DataLayout = NCHW;
1052 dataLayoutY:DataLayout = NCHW;
1053}
1054
1055table BatchMatMulLayer {
1056 base:LayerBase;
1057 descriptor:BatchMatMulDescriptor;
1058}
1059
David Monahan616b22f2023-07-25 12:08:10 +01001060table TileDescriptor {
1061 m_Multiples:[uint];
1062}
1063
1064table TileLayer {
1065 base:LayerBase;
1066 descriptor:TileDescriptor;
1067}
1068
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001069union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +00001070 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001071 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +00001072 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +00001073 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +00001074 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +00001075 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +00001076 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +00001077 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001078 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +00001079 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +00001080 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +00001081 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +00001082 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +00001083 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +00001084 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +00001085 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +00001086 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +00001087 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +00001088 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +00001089 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +00001090 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +00001091 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +00001092 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +00001093 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +00001094 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +00001095 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +00001096 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +00001097 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +00001098 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +00001099 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +00001100 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +00001101 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +00001102 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +00001103 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +00001104 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +01001105 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +00001106 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +01001107 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +01001108 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +01001109 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +01001110 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +01001111 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +01001112 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +01001113 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +01001114 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +01001115 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +01001116 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +01001117 ArgMinMaxLayer,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +01001118 SliceLayer,
Aron Virginas-Tar781ced92019-10-03 11:15:39 +01001119 DepthToSpaceLayer,
Sadik Armagan26257852019-10-14 13:00:47 +01001120 InstanceNormalizationLayer,
Aron Virginas-Tare80ebd12019-10-17 16:11:54 +01001121 LogSoftmaxLayer,
Aron Virginas-Tar85121a22019-10-23 10:41:35 +01001122 ComparisonLayer,
josh minor4a3c6102020-01-06 16:40:46 -06001123 StandInLayer,
Mike Kellyc9ea45a2020-02-28 18:11:58 +00001124 ElementwiseUnaryLayer,
James Conroy8d333182020-05-13 10:27:58 +01001125 TransposeLayer,
Keith Davis300ad562020-06-04 16:34:23 +01001126 QLstmLayer,
Finn Williams2605b232020-06-10 15:53:46 +01001127 FillLayer,
James Conroyaba90cd2020-11-06 16:28:18 +00001128 RankLayer,
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001129 LogicalBinaryLayer,
mathad01b392e982021-04-07 12:07:30 +01001130 ReduceLayer,
Keith Davis3ae3f972021-05-21 16:33:48 +01001131 CastLayer,
Narumol Prangnawarata0162e12021-07-23 14:47:49 +01001132 ShapeLayer,
1133 UnidirectionalSequenceLstmLayer,
Simon Obute51f67772021-09-03 15:50:13 +01001134 ChannelShuffleLayer,
Matthew Sloyanb63a3112021-09-08 13:05:51 +01001135 Convolution3dLayer,
Tamas Nyirid998a1c2021-11-05 14:55:33 +00001136 Pooling3dLayer,
Teresa Charlin6966bfa2022-04-25 17:14:50 +01001137 GatherNdLayer,
Samuel Yapa04f4a12022-08-19 11:14:38 +01001138 BatchMatMulLayer,
Mike Kelly3ec30772023-03-08 13:47:17 +00001139 ElementwiseBinaryLayer,
Tracy Narine944fb502023-07-04 15:08:57 +01001140 ReverseV2Layer,
David Monahan616b22f2023-07-25 12:08:10 +01001141 TileLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001142}
1143
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001144table AnyLayer {
1145 layer:Layer;
1146}
1147
Tee Jungaa920c52019-11-05 10:48:25 +00001148table FeatureCompatibilityVersions {
1149 bindingIdsScheme:uint = 0;
Jan Eilers53ef7952021-06-02 12:01:25 +01001150 weightsLayoutScheme:uint = 0;
Matthew Sloyan81beae32021-07-13 19:46:11 +01001151 constantTensorsAsInputs:uint = 0;
Tee Jungaa920c52019-11-05 10:48:25 +00001152}
1153
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001154// Root type for serialized data is the graph of the network
1155table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +00001156 layers:[AnyLayer];
Tee Jungaa920c52019-11-05 10:48:25 +00001157 inputIds:[int];
1158 outputIds:[int];
1159 featureVersions:FeatureCompatibilityVersions;
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001160}
1161
Sadik Armagan0c3ea5b2021-02-03 09:29:30 +00001162root_type SerializedGraph;