blob: 6450d16ca8e83f742c0cc3e0f8355e81b787250d [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,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100143 Slice = 48,
144 DepthToSpace = 49
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000145}
146
147// Base layer table to be used as part of other layers
148table LayerBase {
149 index:uint;
150 layerName:string;
151 layerType:LayerType;
152 inputSlots:[InputSlot];
153 outputSlots:[OutputSlot];
154}
155
156table BindableLayerBase {
157 base:LayerBase;
158 layerBindingId:int;
159}
160
161// Table for each layer defined below
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100162
163table AbsLayer {
164 base:LayerBase;
165}
166
Mike Kellyaf484012019-02-20 16:53:11 +0000167table ActivationLayer {
168 base:LayerBase;
169 descriptor:ActivationDescriptor;
170}
171
172table ActivationDescriptor {
173 function:ActivationFunction = Sigmoid;
174 a:float;
175 b:float;
176}
177
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000178table AdditionLayer {
179 base:LayerBase;
180}
181
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100182table ArgMinMaxLayer {
183 base:LayerBase;
184 descriptor:ArgMinMaxDescriptor;
185}
186
187table ArgMinMaxDescriptor{
188 function:ArgMinMaxFunction;
189 axis:int;
190}
191
Conor Kennedy76277882019-02-26 08:29:54 +0000192table ConstantLayer {
193 base:LayerBase;
194 input:ConstTensor;
195}
196
Mike Kellya0766c32019-02-19 17:22:07 +0000197table Convolution2dLayer {
198 base:LayerBase;
199 descriptor:Convolution2dDescriptor;
200 weights:ConstTensor;
201 biases:ConstTensor;
202}
203
204table Convolution2dDescriptor {
205 padLeft:uint;
206 padRight:uint;
207 padTop:uint;
208 padBottom:uint;
209 strideX:uint;
210 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100211 dilationX:uint = 1;
212 dilationY:uint = 1;
Mike Kellya0766c32019-02-19 17:22:07 +0000213 biasEnabled:bool = false;
214 dataLayout:DataLayout = NCHW;
215}
216
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100217table DepthToSpaceLayer {
218 base:LayerBase;
219 descriptor:DepthToSpaceDescriptor;
220}
221
222table DepthToSpaceDescriptor {
223 blockSize:uint;
224 dataLayout:DataLayout;
225}
226
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000227table DivisionLayer {
228 base:LayerBase;
229}
230
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000231table EqualLayer {
232 base:LayerBase;
233}
234
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000235table FloorLayer{
236 base:LayerBase;
237}
238
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000239table FullyConnectedLayer {
240 base:LayerBase;
241 descriptor:FullyConnectedDescriptor;
242 weights:ConstTensor;
243 biases:ConstTensor;
244}
245
246table FullyConnectedDescriptor {
247 biasEnabled:bool = false;
248 transposeWeightsMatrix:bool = false;
249}
250
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000251table GatherLayer {
252 base:LayerBase;
253}
254
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000255table GreaterLayer {
256 base:LayerBase;
257}
258
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000259table InputLayer {
260 base:BindableLayerBase;
261}
262
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000263table L2NormalizationLayer {
264 base:LayerBase;
265 descriptor:L2NormalizationDescriptor;
266}
267
268table L2NormalizationDescriptor {
269 dataLayout:DataLayout = NCHW;
Ferran Balaguer0dcffec2019-06-18 16:25:06 +0100270 eps:float = 1e-12;
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000271}
272
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000273table MinimumLayer {
274 base:LayerBase;
275}
276
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000277table MaximumLayer {
278 base:LayerBase;
279}
280
Sadik Armagan5f450272019-02-12 14:31:45 +0000281table MultiplicationLayer {
282 base:LayerBase;
283}
284
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000285table Pooling2dLayer {
286 base:LayerBase;
287 descriptor:Pooling2dDescriptor;
288}
289
290enum PoolingAlgorithm : byte {
291 Max = 0,
292 Average = 1,
293 L2 = 2
294}
295
296enum OutputShapeRounding : byte {
297 Floor = 0,
298 Ceiling = 1
299}
300
301enum PaddingMethod : byte {
302 IgnoreValue = 0,
303 Exclude = 1
304}
305
306table Pooling2dDescriptor {
307 poolType:PoolingAlgorithm;
308 padLeft:uint;
309 padRight:uint;
310 padTop:uint;
311 padBottom:uint;
312 poolWidth:uint;
313 poolHeight:uint;
314 strideX:uint;
315 strideY:uint;
316 outputShapeRounding:OutputShapeRounding;
317 paddingMethod:PaddingMethod;
318 dataLayout:DataLayout;
319}
320
Derek Lamberti87acb272019-03-27 16:51:31 +0000321table QuantizeLayer {
322 base:LayerBase;
323}
324
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000325table SoftmaxLayer {
326 base:LayerBase;
327 descriptor:SoftmaxDescriptor;
328}
329
330table SoftmaxDescriptor {
331 beta:float;
332}
333
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000334table DepthwiseConvolution2dLayer {
335 base:LayerBase;
336 descriptor:DepthwiseConvolution2dDescriptor;
337 weights:ConstTensor;
338 biases:ConstTensor;
339}
340
341table DepthwiseConvolution2dDescriptor {
342 padLeft:uint;
343 padRight:uint;
344 padTop:uint;
345 padBottom:uint;
346 strideX:uint;
347 strideY:uint;
Matthew Benthamacad04e2019-05-13 10:02:45 +0100348 dilationX:uint = 1;
349 dilationY:uint = 1;
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000350 biasEnabled:bool = false;
351 dataLayout:DataLayout = NCHW;
352}
353
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000354table OutputLayer {
355 base:BindableLayerBase;
356}
357
Saoirse Stewart263829c2019-02-19 15:54:14 +0000358table ReshapeLayer {
359 base:LayerBase;
360 descriptor:ReshapeDescriptor;
361}
362
363table ReshapeDescriptor {
364 targetShape:[uint];
365}
366
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000367table PermuteLayer {
368 base:LayerBase;
369 descriptor:PermuteDescriptor;
370}
371
372table PermuteDescriptor {
373 dimMappings:[uint];
374}
375
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000376table SpaceToBatchNdLayer {
377 base:LayerBase;
378 descriptor:SpaceToBatchNdDescriptor;
379}
380
381table SpaceToBatchNdDescriptor {
382 blockShape:[uint];
383 padList:[uint];
384 dataLayout:DataLayout;
385}
386
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100387table SpaceToDepthLayer {
388 base:LayerBase;
389 descriptor:SpaceToDepthDescriptor;
390}
391
392table SpaceToDepthDescriptor {
393 blockSize:uint;
394 dataLayout:DataLayout;
395}
396
Conor Kennedyda1f9752019-03-01 14:37:12 +0000397table SubtractionLayer {
398 base:LayerBase;
399}
400
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000401table BatchToSpaceNdLayer {
402 base:LayerBase;
403 descriptor:BatchToSpaceNdDescriptor;
404}
405
406table BatchToSpaceNdDescriptor {
407 blockShape:[uint];
408 crops:[uint];
409 dataLayout:DataLayout;
410}
411
Nina Drozd57728782019-02-27 10:53:27 +0000412enum NormalizationAlgorithmChannel : byte {
413 Across = 0,
414 Within = 1
415}
416
417enum NormalizationAlgorithmMethod : byte {
418 LocalBrightness = 0,
419 LocalContrast = 1
420}
421
422table NormalizationLayer {
423 base:LayerBase;
424 descriptor:NormalizationDescriptor;
425}
426
427table NormalizationDescriptor {
428 normChannelType:NormalizationAlgorithmChannel = Across;
429 normMethodType:NormalizationAlgorithmMethod = LocalBrightness;
430 normSize:uint;
431 alpha:float;
432 beta:float;
433 k:float;
434 dataLayout:DataLayout = NCHW;
435}
436
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000437table MeanLayer {
438 base:LayerBase;
439 descriptor:MeanDescriptor;
440}
441
442table MeanDescriptor {
443 axis:[uint];
444 keepDims:bool = false;
445}
446
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000447table PadLayer {
448 base:LayerBase;
449 descriptor:PadDescriptor;
450}
451
452table PadDescriptor {
453 padList:[uint];
David Monahan34757812019-06-19 11:47:21 +0100454 padValue:float = 0;
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000455}
456
Sadik Armagan8b42a382019-03-01 14:24:49 +0000457table RsqrtLayer {
458 base:LayerBase;
459}
460
ruoyan018e7fa232019-02-28 15:09:07 +0000461table BatchNormalizationLayer {
462 base:LayerBase;
463 descriptor:BatchNormalizationDescriptor;
464 mean:ConstTensor;
465 variance:ConstTensor;
466 beta:ConstTensor;
467 gamma:ConstTensor;
468}
469
470table BatchNormalizationDescriptor {
471 eps:float;
472 dataLayout:DataLayout;
473}
474
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000475table ResizeBilinearLayer {
476 base:LayerBase;
477 descriptor:ResizeBilinearDescriptor;
478}
479
480table ResizeBilinearDescriptor {
481 targetWidth:uint;
482 targetHeight:uint;
483 dataLayout:DataLayout;
484}
485
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100486table SliceLayer {
487 base:LayerBase;
488 descriptor:SliceDescriptor;
489}
490
491table SliceDescriptor {
492 begin:[uint];
493 size:[uint];
494}
495
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000496table StridedSliceLayer {
497 base:LayerBase;
498 descriptor:StridedSliceDescriptor;
499}
500
501table StridedSliceDescriptor {
502 begin:[int];
503 end:[int];
504 stride:[int];
505 beginMask:int;
506 endMask:int;
507 shrinkAxisMask:int;
508 ellipsisMask:int;
509 newAxisMask:int;
510 dataLayout:DataLayout;
511}
512
Jim Flynne242f2d2019-05-22 14:24:13 +0100513table ConcatLayer {
514 base:LayerBase;
515 descriptor:OriginsDescriptor;
516}
517
Jim Flynnac25a1b2019-02-28 10:40:49 +0000518table MergerLayer {
519 base:LayerBase;
520 descriptor:OriginsDescriptor;
521}
522
523table UintVector {
524 data:[uint];
525}
526
527table OriginsDescriptor {
528 concatAxis:uint;
529 numViews:uint;
530 numDimensions:uint;
531 viewOrigins:[UintVector];
532}
533
Jim Flynn18ce3382019-03-08 11:08:30 +0000534table ViewsDescriptor {
535 origins:OriginsDescriptor;
536 viewSizes:[UintVector];
537}
538
539table SplitterLayer {
540 base:LayerBase;
541 descriptor:ViewsDescriptor;
542}
543
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000544table DetectionPostProcessLayer {
545 base:LayerBase;
546 descriptor:DetectionPostProcessDescriptor;
547 anchors:ConstTensor;
548}
549
550table DetectionPostProcessDescriptor {
551 maxDetections:uint;
552 maxClassesPerDetection:uint;
553 detectionsPerClass:uint;
554 nmsScoreThreshold:float;
555 nmsIouThreshold:float;
556 numClasses:uint;
557 useRegularNms:bool;
558 scaleX:float;
559 scaleY:float;
560 scaleW:float;
561 scaleH:float;
562}
563
Jim Flynn11af3752019-03-19 17:22:29 +0000564table LstmInputParams {
565 inputToForgetWeights:ConstTensor;
566 inputToCellWeights:ConstTensor;
567 inputToOutputWeights:ConstTensor;
568 recurrentToForgetWeights:ConstTensor;
569 recurrentToCellWeights:ConstTensor;
570 recurrentToOutputWeights:ConstTensor;
571 forgetGateBias:ConstTensor;
572 cellBias:ConstTensor;
573 outputGateBias:ConstTensor;
574
575 inputToInputWeights:ConstTensor;
576 recurrentToInputWeights:ConstTensor;
577 cellToInputWeights:ConstTensor;
578 inputGateBias:ConstTensor;
579
580 projectionWeights:ConstTensor;
581 projectionBias:ConstTensor;
582
583 cellToForgetWeights:ConstTensor;
584 cellToOutputWeights:ConstTensor;
Jan Eilersf8c62972019-07-17 11:07:49 +0100585
586 inputLayerNormWeights:ConstTensor;
587 forgetLayerNormWeights:ConstTensor;
588 cellLayerNormWeights:ConstTensor;
589 outputLayerNormWeights:ConstTensor;
Jim Flynn11af3752019-03-19 17:22:29 +0000590}
591
Jan Eilers5b01a892019-07-23 09:47:43 +0100592table QuantizedLstmInputParams {
593 inputToInputWeights:ConstTensor;
594 inputToForgetWeights:ConstTensor;
595 inputToCellWeights:ConstTensor;
596 inputToOutputWeights:ConstTensor;
597
598 recurrentToInputWeights:ConstTensor;
599 recurrentToForgetWeights:ConstTensor;
600 recurrentToCellWeights:ConstTensor;
601 recurrentToOutputWeights:ConstTensor;
602
603 inputGateBias:ConstTensor;
604 forgetGateBias:ConstTensor;
605 cellBias:ConstTensor;
606 outputGateBias:ConstTensor;
607}
608
Jim Flynn11af3752019-03-19 17:22:29 +0000609table LstmDescriptor {
610 activationFunc:uint;
611 clippingThresCell:float;
612 clippingThresProj:float;
613 cifgEnabled:bool = true;
614 peepholeEnabled:bool = false;
615 projectionEnabled:bool = false;
Jan Eilersf8c62972019-07-17 11:07:49 +0100616 layerNormEnabled:bool = false;
Jim Flynn11af3752019-03-19 17:22:29 +0000617}
618
619table LstmLayer {
620 base:LayerBase;
621 descriptor:LstmDescriptor;
622 inputParams:LstmInputParams;
623}
624
Jan Eilers5b01a892019-07-23 09:47:43 +0100625table QuantizedLstmLayer {
626 base:LayerBase;
627 inputParams:QuantizedLstmInputParams;
628}
629
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000630table DequantizeLayer {
631 base:LayerBase;
632}
633
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100634table MergeLayer {
635 base:LayerBase;
636}
637
Sadik Armaganeff363d2019-04-05 15:25:46 +0100638table SwitchLayer {
639 base:LayerBase;
640}
641
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100642table PreluLayer {
643 base:LayerBase;
644}
645
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100646table TransposeConvolution2dLayer {
647 base:LayerBase;
648 descriptor:TransposeConvolution2dDescriptor;
649 weights:ConstTensor;
650 biases:ConstTensor;
651}
652
653table TransposeConvolution2dDescriptor {
654 padLeft:uint;
655 padRight:uint;
656 padTop:uint;
657 padBottom:uint;
658 strideX:uint;
659 strideY:uint;
660 biasEnabled:bool = false;
661 dataLayout:DataLayout = NCHW;
662}
663
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100664table ResizeLayer {
665 base:LayerBase;
666 descriptor:ResizeDescriptor;
667}
668
669table ResizeDescriptor {
670 targetHeight:uint;
671 targetWidth:uint;
672 method:ResizeMethod = NearestNeighbor;
673 dataLayout:DataLayout;
674}
675
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100676table StackLayer {
677 base:LayerBase;
678 descriptor:StackDescriptor;
679}
680
681table StackDescriptor {
682 axis:uint;
683 numInputs:uint;
684 inputShape:[uint];
685}
686
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000687union Layer {
Mike Kellyaf484012019-02-20 16:53:11 +0000688 ActivationLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000689 AdditionLayer,
Nattapat Chaimanowong6b4ed982019-02-26 17:24:13 +0000690 BatchToSpaceNdLayer,
ruoyan018e7fa232019-02-28 15:09:07 +0000691 BatchNormalizationLayer,
Conor Kennedy76277882019-02-26 08:29:54 +0000692 ConstantLayer,
Mike Kellya0766c32019-02-19 17:22:07 +0000693 Convolution2dLayer,
Aron Virginas-Tarc04125f2019-02-19 16:31:08 +0000694 DepthwiseConvolution2dLayer,
Sadik Armagandbb0c0c2019-02-21 09:01:41 +0000695 FullyConnectedLayer,
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000696 InputLayer,
Sadik Armagan5f450272019-02-12 14:31:45 +0000697 MultiplicationLayer,
Aron Virginas-Tarfc413c02019-02-13 15:41:52 +0000698 OutputLayer,
Nattapat Chaimanowong30b00202019-02-20 17:31:34 +0000699 PermuteLayer,
Saoirse Stewart3166c3e2019-02-18 15:24:53 +0000700 Pooling2dLayer,
Saoirse Stewart263829c2019-02-19 15:54:14 +0000701 ReshapeLayer,
Nattapat Chaimanowong45286992019-02-26 15:53:02 +0000702 SoftmaxLayer,
Éanna Ó Catháin58885892019-02-27 16:16:39 +0000703 SpaceToBatchNdLayer,
Aron Virginas-Tar0fe32452019-02-28 13:12:47 +0000704 DivisionLayer,
Nattapat Chaimanowong235cea52019-02-28 16:27:30 +0000705 MinimumLayer,
Aron Virginas-Tar377351e2019-02-27 14:42:31 +0000706 EqualLayer,
Nina Drozd57728782019-02-27 10:53:27 +0000707 MaximumLayer,
Nattapat Chaimanowongebb0f9c2019-03-01 12:14:06 +0000708 NormalizationLayer,
Sadik Armagan8b42a382019-03-01 14:24:49 +0000709 PadLayer,
Finn Williamsdd2ba7e2019-03-01 11:51:52 +0000710 RsqrtLayer,
Conor Kennedy79ffdf52019-03-01 14:24:54 +0000711 FloorLayer,
Nattapat Chaimanowong6522cdc2019-03-01 16:14:13 +0000712 GreaterLayer,
Conor Kennedyda1f9752019-03-01 14:37:12 +0000713 ResizeBilinearLayer,
Nattapat Chaimanowongb3485212019-03-04 12:35:39 +0000714 SubtractionLayer,
Saoirse Stewarta1ed73a2019-03-04 13:40:12 +0000715 StridedSliceLayer,
Sadik Armaganac97c8c2019-03-04 17:44:21 +0000716 GatherLayer,
Jim Flynnac25a1b2019-02-28 10:40:49 +0000717 MeanLayer,
Narumol Prangnawarat495701f2019-03-07 17:31:34 +0000718 MergerLayer,
Jim Flynn18ce3382019-03-08 11:08:30 +0000719 L2NormalizationLayer,
Nattapat Chaimanowong3e14a9d2019-03-18 12:37:06 +0000720 SplitterLayer,
Jim Flynn11af3752019-03-19 17:22:29 +0000721 DetectionPostProcessLayer,
Derek Lamberti87acb272019-03-27 16:51:31 +0000722 LstmLayer,
Jan Eilers5b01a892019-07-23 09:47:43 +0100723 QuantizedLstmLayer,
Nattapat Chaimanowonge4294fd2019-03-28 09:56:53 +0000724 QuantizeLayer,
Nattapat Chaimanowong1f886302019-04-05 13:37:19 +0100725 DequantizeLayer,
Sadik Armaganeff363d2019-04-05 15:25:46 +0100726 MergeLayer,
Jim Flynne242f2d2019-05-22 14:24:13 +0100727 SwitchLayer,
Aron Virginas-Taraa067142019-06-11 16:01:44 +0100728 ConcatLayer,
Ellen Norris-Thompson51982472019-06-19 11:46:21 +0100729 SpaceToDepthLayer,
Aron Virginas-Tarcb549302019-06-21 13:53:38 +0100730 PreluLayer,
FinnWilliamsArm6fb339a2019-06-28 15:07:10 +0100731 TransposeConvolution2dLayer,
Matthew Jacksonb5433ee2019-07-11 15:54:20 +0100732 ResizeLayer,
FinnWilliamsArm4ffcc8f2019-09-05 14:34:20 +0100733 StackLayer,
Narumol Prangnawarat0cfcf232019-09-09 17:16:24 +0100734 AbsLayer,
Aron Virginas-Tar2fda80b2019-09-18 13:36:52 +0100735 ArgMinMaxLayer,
Aron Virginas-Tarda9d2d32019-09-20 10:42:02 +0100736 SliceLayer,
737 DepthToSpaceLayer
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000738}
739
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +0000740table AnyLayer {
741 layer:Layer;
742}
743
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000744// Root type for serialized data is the graph of the network
745table SerializedGraph {
Saoirse Stewart49dbe0e2019-02-05 17:27:06 +0000746 layers:[AnyLayer];
Mike Kelly8c1701a2019-02-11 17:01:27 +0000747 inputIds:[uint];
748 outputIds:[uint];
Nattapat Chaimanowong969eea32019-01-30 13:33:11 +0000749}
750
751root_type SerializedGraph;