blob: 6b07510a21d18a19d2d1b0750a39f21ef35fa18d [file] [log] [blame]
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// 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,
22 Square = 9
23}
24
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +010025enum ArgMinMaxFunction : byte {
26 Min = 0,
27 Max = 1
28}
29
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000030enum DataType : byte {
31 Float16 = 0,
32 Float32 = 1,
33 QuantisedAsymm8 = 2,
34 Signed32 = 3,
Nattapat Chaimanowongcd5ac232019-03-19 12:26:36 +000035 Boolean = 4,
36 QuantisedSymm16 = 5
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000037}
38
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000039enum DataLayout : byte {
40 NHWC = 0,
41 NCHW = 1
42}
43
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +010044enum ResizeMethod: byte {
45 NearestNeighbor = 0,
46 Bilinear = 1,
47}
48
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +000049table TensorInfo {
50 dimensions:[uint];
51 dataType:DataType;
52 quantizationScale:float = 1.0;
53 quantizationOffset:int = 0;
54}
55
56struct Connection {
57 sourceLayerIndex:uint;
58 outputSlotIndex:uint;
59}
60
61table ByteData {
62 data:[byte];
63}
64
65table ShortData {
66 data:[short];
67}
68
69table IntData {
70 data:[int];
71}
72
73table LongData {
74 data:[long];
75}
76
77union ConstTensorData { ByteData, ShortData, IntData, LongData }
78
79table ConstTensor {
80 info:TensorInfo;
81 data:ConstTensorData;
82}
83
84table InputSlot {
85 index:uint;
86 connection:Connection;
87}
88
89table OutputSlot {
90 index:uint;
91 tensorInfo:TensorInfo;
92}
93
94enum LayerType : uint {
95 Addition = 0,
96 Input = 1,
Sadik Armagan5f450272019-02-12 14:31:45 +000097 Multiplication = 2,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +000098 Output = 3,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +000099 Pooling2d = 4,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000100 Reshape = 5,
Mike Kellya0766c32019-02-19 17:22:07 +0000101 Softmax = 6,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000102 Convolution2d = 7,
Mike Kellyaf484012019-02-20 16:53:11 +0000103 DepthwiseConvolution2d = 8,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000104 Activation = 9,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000105 Permute = 10,
Conor Kennedy76277882019-02-26 08:29:54 +0000106 FullyConnected = 11,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000107 Constant = 12,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000108 SpaceToBatchNd = 13,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000109 BatchToSpaceNd = 14,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000110 Division = 15,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000111 Minimum = 16,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000112 Equal = 17,
Nina Drozd57728782019-02-27 10:53:27 +0000113 Maximum = 18,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000114 Normalization = 19,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000115 Pad = 20,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000116 Rsqrt = 21,
ruoyan018e7fa232019-02-28 15:09:07 +0000117 Floor = 22,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000118 BatchNormalization = 23,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000119 Greater = 24,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000120 ResizeBilinear = 25,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000121 Subtraction = 26,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000122 StridedSlice = 27,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000123 Gather = 28,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000124 Mean = 29,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000125 Merger = 30,
Jim Flynn18ce3382019-03-08 11:08:30 +0000126 L2Normalization = 31,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000127 Splitter = 32,
Jim Flynn11af3752019-03-19 17:22:29 +0000128 DetectionPostProcess = 33,
Derek Lamberti87acb272019-03-27 16:51:31 +0000129 Lstm = 34,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000130 Quantize = 35,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100131 Dequantize = 36,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100132 Merge = 37,
Jim Flynne242f2d2019-05-22 14:24:13 +0100133 Switch = 38,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100134 Concat = 39,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100135 SpaceToDepth = 40,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100136 Prelu = 41,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100137 TransposeConvolution2d = 42,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100138 Resize = 43,
Jan Eilers5b01a892019-07-23 09:47:43 +0100139 Stack = 44,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100140 QuantizedLstm = 45,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100141 Abs = 46,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100142 ArgMinMax = 47,
143 Slice = 48
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000144}
145
146// Base layer table to be used as part of other layers
147table LayerBase {
148 index:uint;
149 layerName:string;
150 layerType:LayerType;
151 inputSlots:[InputSlot];
152 outputSlots:[OutputSlot];
153}
154
155table BindableLayerBase {
156 base:LayerBase;
157 layerBindingId:int;
158}
159
160// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100161
162table AbsLayer {
163 base:LayerBase;
164}
165
Mike Kellyaf484012019-02-20 16:53:11 +0000166table ActivationLayer {
167 base:LayerBase;
168 descriptor:ActivationDescriptor;
169}
170
171table ActivationDescriptor {
172 function:ActivationFunction = Sigmoid;
173 a:float;
174 b:float;
175}
176
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000177table AdditionLayer {
178 base:LayerBase;
179}
180
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100181table ArgMinMaxLayer {
182 base:LayerBase;
183 descriptor:ArgMinMaxDescriptor;
184}
185
186table ArgMinMaxDescriptor{
187 function:ArgMinMaxFunction;
188 axis:int;
189}
190
Conor Kennedy76277882019-02-26 08:29:54 +0000191table ConstantLayer {
192 base:LayerBase;
193 input:ConstTensor;
194}
195
Mike Kellya0766c32019-02-19 17:22:07 +0000196table Convolution2dLayer {
197 base:LayerBase;
198 descriptor:Convolution2dDescriptor;
199 weights:ConstTensor;
200 biases:ConstTensor;
201}
202
203table Convolution2dDescriptor {
204 padLeft:uint;
205 padRight:uint;
206 padTop:uint;
207 padBottom:uint;
208 strideX:uint;
209 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100210 dilationX:uint = 1;
211 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000212 biasEnabled:bool = false;
213 dataLayout:DataLayout = NCHW;
214}
215
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000216table DivisionLayer {
217 base:LayerBase;
218}
219
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000220table EqualLayer {
221 base:LayerBase;
222}
223
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000224table FloorLayer{
225 base:LayerBase;
226}
227
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000228table FullyConnectedLayer {
229 base:LayerBase;
230 descriptor:FullyConnectedDescriptor;
231 weights:ConstTensor;
232 biases:ConstTensor;
233}
234
235table FullyConnectedDescriptor {
236 biasEnabled:bool = false;
237 transposeWeightsMatrix:bool = false;
238}
239
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000240table GatherLayer {
241 base:LayerBase;
242}
243
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000244table GreaterLayer {
245 base:LayerBase;
246}
247
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000248table InputLayer {
249 base:BindableLayerBase;
250}
251
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000252table L2NormalizationLayer {
253 base:LayerBase;
254 descriptor:L2NormalizationDescriptor;
255}
256
257table L2NormalizationDescriptor {
258 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100259 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000260}
261
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000262table MinimumLayer {
263 base:LayerBase;
264}
265
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000266table MaximumLayer {
267 base:LayerBase;
268}
269
Sadik Armagan5f450272019-02-12 14:31:45 +0000270table MultiplicationLayer {
271 base:LayerBase;
272}
273
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000274table Pooling2dLayer {
275 base:LayerBase;
276 descriptor:Pooling2dDescriptor;
277}
278
279enum PoolingAlgorithm : byte {
280 Max = 0,
281 Average = 1,
282 L2 = 2
283}
284
285enum OutputShapeRounding : byte {
286 Floor = 0,
287 Ceiling = 1
288}
289
290enum PaddingMethod : byte {
291 IgnoreValue = 0,
292 Exclude = 1
293}
294
295table Pooling2dDescriptor {
296 poolType:PoolingAlgorithm;
297 padLeft:uint;
298 padRight:uint;
299 padTop:uint;
300 padBottom:uint;
301 poolWidth:uint;
302 poolHeight:uint;
303 strideX:uint;
304 strideY:uint;
305 outputShapeRounding:OutputShapeRounding;
306 paddingMethod:PaddingMethod;
307 dataLayout:DataLayout;
308}
309
Derek Lamberti87acb272019-03-27 16:51:31 +0000310table QuantizeLayer {
311 base:LayerBase;
312}
313
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000314table SoftmaxLayer {
315 base:LayerBase;
316 descriptor:SoftmaxDescriptor;
317}
318
319table SoftmaxDescriptor {
320 beta:float;
321}
322
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000323table DepthwiseConvolution2dLayer {
324 base:LayerBase;
325 descriptor:DepthwiseConvolution2dDescriptor;
326 weights:ConstTensor;
327 biases:ConstTensor;
328}
329
330table DepthwiseConvolution2dDescriptor {
331 padLeft:uint;
332 padRight:uint;
333 padTop:uint;
334 padBottom:uint;
335 strideX:uint;
336 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100337 dilationX:uint = 1;
338 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000339 biasEnabled:bool = false;
340 dataLayout:DataLayout = NCHW;
341}
342
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000343table OutputLayer {
344 base:BindableLayerBase;
345}
346
Saoirse Stewart263829c2019-02-19 15:54:14 +0000347table ReshapeLayer {
348 base:LayerBase;
349 descriptor:ReshapeDescriptor;
350}
351
352table ReshapeDescriptor {
353 targetShape:[uint];
354}
355
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000356table PermuteLayer {
357 base:LayerBase;
358 descriptor:PermuteDescriptor;
359}
360
361table PermuteDescriptor {
362 dimMappings:[uint];
363}
364
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000365table SpaceToBatchNdLayer {
366 base:LayerBase;
367 descriptor:SpaceToBatchNdDescriptor;
368}
369
370table SpaceToBatchNdDescriptor {
371 blockShape:[uint];
372 padList:[uint];
373 dataLayout:DataLayout;
374}
375
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100376table SpaceToDepthLayer {
377 base:LayerBase;
378 descriptor:SpaceToDepthDescriptor;
379}
380
381table SpaceToDepthDescriptor {
382 blockSize:uint;
383 dataLayout:DataLayout;
384}
385
Conor Kennedyda1f9752019-03-01 14:37:12 +0000386table SubtractionLayer {
387 base:LayerBase;
388}
389
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000390table BatchToSpaceNdLayer {
391 base:LayerBase;
392 descriptor:BatchToSpaceNdDescriptor;
393}
394
395table BatchToSpaceNdDescriptor {
396 blockShape:[uint];
397 crops:[uint];
398 dataLayout:DataLayout;
399}
400
Nina Drozd57728782019-02-27 10:53:27 +0000401enum NormalizationAlgorithmChannel : byte {
402 Across = 0,
403 Within = 1
404}
405
406enum NormalizationAlgorithmMethod : byte {
407 LocalBrightness = 0,
408 LocalContrast = 1
409}
410
411table NormalizationLayer {
412 base:LayerBase;
413 descriptor:NormalizationDescriptor;
414}
415
416table NormalizationDescriptor {
417 normChannelType:NormalizationAlgorithmChannel = Across;
418 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
419 normSize:uint;
420 alpha:float;
421 beta:float;
422 k:float;
423 dataLayout:DataLayout = NCHW;
424}
425
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000426table MeanLayer {
427 base:LayerBase;
428 descriptor:MeanDescriptor;
429}
430
431table MeanDescriptor {
432 axis:[uint];
433 keepDims:bool = false;
434}
435
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000436table PadLayer {
437 base:LayerBase;
438 descriptor:PadDescriptor;
439}
440
441table PadDescriptor {
442 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100443 padValue:float = 0;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000444}
445
Sadik Armagan8b42a382019-03-01 14:24:49 +0000446table RsqrtLayer {
447 base:LayerBase;
448}
449
ruoyan018e7fa232019-02-28 15:09:07 +0000450table BatchNormalizationLayer {
451 base:LayerBase;
452 descriptor:BatchNormalizationDescriptor;
453 mean:ConstTensor;
454 variance:ConstTensor;
455 beta:ConstTensor;
456 gamma:ConstTensor;
457}
458
459table BatchNormalizationDescriptor {
460 eps:float;
461 dataLayout:DataLayout;
462}
463
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000464table ResizeBilinearLayer {
465 base:LayerBase;
466 descriptor:ResizeBilinearDescriptor;
467}
468
469table ResizeBilinearDescriptor {
470 targetWidth:uint;
471 targetHeight:uint;
472 dataLayout:DataLayout;
473}
474
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100475table SliceLayer {
476 base:LayerBase;
477 descriptor:SliceDescriptor;
478}
479
480table SliceDescriptor {
481 begin:[uint];
482 size:[uint];
483}
484
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000485table StridedSliceLayer {
486 base:LayerBase;
487 descriptor:StridedSliceDescriptor;
488}
489
490table StridedSliceDescriptor {
491 begin:[int];
492 end:[int];
493 stride:[int];
494 beginMask:int;
495 endMask:int;
496 shrinkAxisMask:int;
497 ellipsisMask:int;
498 newAxisMask:int;
499 dataLayout:DataLayout;
500}
501
Jim Flynne242f2d2019-05-22 14:24:13 +0100502table ConcatLayer {
503 base:LayerBase;
504 descriptor:OriginsDescriptor;
505}
506
Jim Flynnac25a1b2019-02-28 10:40:49 +0000507table MergerLayer {
508 base:LayerBase;
509 descriptor:OriginsDescriptor;
510}
511
512table UintVector {
513 data:[uint];
514}
515
516table OriginsDescriptor {
517 concatAxis:uint;
518 numViews:uint;
519 numDimensions:uint;
520 viewOrigins:[UintVector];
521}
522
Jim Flynn18ce3382019-03-08 11:08:30 +0000523table ViewsDescriptor {
524 origins:OriginsDescriptor;
525 viewSizes:[UintVector];
526}
527
528table SplitterLayer {
529 base:LayerBase;
530 descriptor:ViewsDescriptor;
531}
532
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000533table DetectionPostProcessLayer {
534 base:LayerBase;
535 descriptor:DetectionPostProcessDescriptor;
536 anchors:ConstTensor;
537}
538
539table DetectionPostProcessDescriptor {
540 maxDetections:uint;
541 maxClassesPerDetection:uint;
542 detectionsPerClass:uint;
543 nmsScoreThreshold:float;
544 nmsIouThreshold:float;
545 numClasses:uint;
546 useRegularNms:bool;
547 scaleX:float;
548 scaleY:float;
549 scaleW:float;
550 scaleH:float;
551}
552
Jim Flynn11af3752019-03-19 17:22:29 +0000553table LstmInputParams {
554 inputToForgetWeights:ConstTensor;
555 inputToCellWeights:ConstTensor;
556 inputToOutputWeights:ConstTensor;
557 recurrentToForgetWeights:ConstTensor;
558 recurrentToCellWeights:ConstTensor;
559 recurrentToOutputWeights:ConstTensor;
560 forgetGateBias:ConstTensor;
561 cellBias:ConstTensor;
562 outputGateBias:ConstTensor;
563
564 inputToInputWeights:ConstTensor;
565 recurrentToInputWeights:ConstTensor;
566 cellToInputWeights:ConstTensor;
567 inputGateBias:ConstTensor;
568
569 projectionWeights:ConstTensor;
570 projectionBias:ConstTensor;
571
572 cellToForgetWeights:ConstTensor;
573 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100574
575 inputLayerNormWeights:ConstTensor;
576 forgetLayerNormWeights:ConstTensor;
577 cellLayerNormWeights:ConstTensor;
578 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000579}
580
Jan Eilers5b01a892019-07-23 09:47:43 +0100581table QuantizedLstmInputParams {
582 inputToInputWeights:ConstTensor;
583 inputToForgetWeights:ConstTensor;
584 inputToCellWeights:ConstTensor;
585 inputToOutputWeights:ConstTensor;
586
587 recurrentToInputWeights:ConstTensor;
588 recurrentToForgetWeights:ConstTensor;
589 recurrentToCellWeights:ConstTensor;
590 recurrentToOutputWeights:ConstTensor;
591
592 inputGateBias:ConstTensor;
593 forgetGateBias:ConstTensor;
594 cellBias:ConstTensor;
595 outputGateBias:ConstTensor;
596}
597
Jim Flynn11af3752019-03-19 17:22:29 +0000598table LstmDescriptor {
599 activationFunc:uint;
600 clippingThresCell:float;
601 clippingThresProj:float;
602 cifgEnabled:bool = true;
603 peepholeEnabled:bool = false;
604 projectionEnabled:bool = false;
Jan Eilersf8c62972019-07-17 11:07:49 +0100605 layerNormEnabled:bool = false;
Jim Flynn11af3752019-03-19 17:22:29 +0000606}
607
608table LstmLayer {
609 base:LayerBase;
610 descriptor:LstmDescriptor;
611 inputParams:LstmInputParams;
612}
613
Jan Eilers5b01a892019-07-23 09:47:43 +0100614table QuantizedLstmLayer {
615 base:LayerBase;
616 inputParams:QuantizedLstmInputParams;
617}
618
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000619table DequantizeLayer {
620 base:LayerBase;
621}
622
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100623table MergeLayer {
624 base:LayerBase;
625}
626
Sadik Armaganeff363d2019-04-05 15:25:46 +0100627table SwitchLayer {
628 base:LayerBase;
629}
630
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100631table PreluLayer {
632 base:LayerBase;
633}
634
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100635table TransposeConvolution2dLayer {
636 base:LayerBase;
637 descriptor:TransposeConvolution2dDescriptor;
638 weights:ConstTensor;
639 biases:ConstTensor;
640}
641
642table TransposeConvolution2dDescriptor {
643 padLeft:uint;
644 padRight:uint;
645 padTop:uint;
646 padBottom:uint;
647 strideX:uint;
648 strideY:uint;
649 biasEnabled:bool = false;
650 dataLayout:DataLayout = NCHW;
651}
652
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100653table ResizeLayer {
654 base:LayerBase;
655 descriptor:ResizeDescriptor;
656}
657
658table ResizeDescriptor {
659 targetHeight:uint;
660 targetWidth:uint;
661 method:ResizeMethod = NearestNeighbor;
662 dataLayout:DataLayout;
663}
664
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100665table StackLayer {
666 base:LayerBase;
667 descriptor:StackDescriptor;
668}
669
670table StackDescriptor {
671 axis:uint;
672 numInputs:uint;
673 inputShape:[uint];
674}
675
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000676union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +0000677 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000678 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000679 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +0000680 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +0000681 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +0000682 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000683 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000684 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000685 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +0000686 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000687 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000688 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000689 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000690 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000691 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000692 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000693 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000694 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000695 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +0000696 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000697 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000698 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000699 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000700 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000701 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000702 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000703 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000704 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000705 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000706 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000707 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +0000708 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000709 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +0000710 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +0000711 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +0100712 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000713 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100714 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100715 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +0100716 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100717 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100718 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100719 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100720 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100721 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100722 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100723 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100724 ArgMinMaxLayer,
725 SliceLayer
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000726}
727
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +0000728table AnyLayer {
729 layer:Layer;
730}
731
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000732// Root type for serialized data is the graph of the network
733table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +0000734 layers:[AnyLayer];
Mike Kelly8c1701a2019-02-11 17:01:27 +0000735 inputIds:[uint];
736 outputIds:[uint];
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000737}
738
739root_type SerializedGraph;