Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
Derek Lamberti | 0028d1b | 2019-02-20 13:57:42 +0000 | [diff] [blame] | 6 | namespace armnnSerializer; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 7 | |
| 8 | file_identifier "ARMN"; |
| 9 | |
| 10 | file_extension "armnn"; |
| 11 | |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 12 | enum 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 Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 25 | enum ArgMinMaxFunction : byte { |
| 26 | Min = 0, |
| 27 | Max = 1 |
| 28 | } |
| 29 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 30 | enum DataType : byte { |
| 31 | Float16 = 0, |
| 32 | Float32 = 1, |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame^] | 33 | QuantisedAsymm8 = 2, // deprecated |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 34 | Signed32 = 3, |
Nattapat Chaimanowong | cd5ac23 | 2019-03-19 12:26:36 +0000 | [diff] [blame] | 35 | Boolean = 4, |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame^] | 36 | QuantisedSymm16 = 5, // deprecated |
| 37 | QAsymmU8 = 6, |
| 38 | QSymmS16 = 7 |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 39 | } |
| 40 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 41 | enum DataLayout : byte { |
| 42 | NHWC = 0, |
| 43 | NCHW = 1 |
| 44 | } |
| 45 | |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 46 | enum ResizeMethod: byte { |
| 47 | NearestNeighbor = 0, |
| 48 | Bilinear = 1, |
| 49 | } |
| 50 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 51 | table TensorInfo { |
| 52 | dimensions:[uint]; |
| 53 | dataType:DataType; |
| 54 | quantizationScale:float = 1.0; |
| 55 | quantizationOffset:int = 0; |
| 56 | } |
| 57 | |
| 58 | struct Connection { |
| 59 | sourceLayerIndex:uint; |
| 60 | outputSlotIndex:uint; |
| 61 | } |
| 62 | |
| 63 | table ByteData { |
| 64 | data:[byte]; |
| 65 | } |
| 66 | |
| 67 | table ShortData { |
| 68 | data:[short]; |
| 69 | } |
| 70 | |
| 71 | table IntData { |
| 72 | data:[int]; |
| 73 | } |
| 74 | |
| 75 | table LongData { |
| 76 | data:[long]; |
| 77 | } |
| 78 | |
| 79 | union ConstTensorData { ByteData, ShortData, IntData, LongData } |
| 80 | |
| 81 | table ConstTensor { |
| 82 | info:TensorInfo; |
| 83 | data:ConstTensorData; |
| 84 | } |
| 85 | |
| 86 | table InputSlot { |
| 87 | index:uint; |
| 88 | connection:Connection; |
| 89 | } |
| 90 | |
| 91 | table OutputSlot { |
| 92 | index:uint; |
| 93 | tensorInfo:TensorInfo; |
| 94 | } |
| 95 | |
| 96 | enum LayerType : uint { |
| 97 | Addition = 0, |
| 98 | Input = 1, |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 99 | Multiplication = 2, |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 100 | Output = 3, |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 101 | Pooling2d = 4, |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 102 | Reshape = 5, |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 103 | Softmax = 6, |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 104 | Convolution2d = 7, |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 105 | DepthwiseConvolution2d = 8, |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 106 | Activation = 9, |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 107 | Permute = 10, |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 108 | FullyConnected = 11, |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 109 | Constant = 12, |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 110 | SpaceToBatchNd = 13, |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 111 | BatchToSpaceNd = 14, |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 112 | Division = 15, |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 113 | Minimum = 16, |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 114 | Equal = 17, |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 115 | Maximum = 18, |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 116 | Normalization = 19, |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 117 | Pad = 20, |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 118 | Rsqrt = 21, |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 119 | Floor = 22, |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 120 | BatchNormalization = 23, |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 121 | Greater = 24, |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 122 | ResizeBilinear = 25, |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 123 | Subtraction = 26, |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 124 | StridedSlice = 27, |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 125 | Gather = 28, |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 126 | Mean = 29, |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 127 | Merger = 30, |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 128 | L2Normalization = 31, |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 129 | Splitter = 32, |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 130 | DetectionPostProcess = 33, |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 131 | Lstm = 34, |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 132 | Quantize = 35, |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 133 | Dequantize = 36, |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 134 | Merge = 37, |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 135 | Switch = 38, |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 136 | Concat = 39, |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 137 | SpaceToDepth = 40, |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 138 | Prelu = 41, |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 139 | TransposeConvolution2d = 42, |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 140 | Resize = 43, |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 141 | Stack = 44, |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 142 | QuantizedLstm = 45, |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 143 | Abs = 46, |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 144 | ArgMinMax = 47, |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 145 | Slice = 48, |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 146 | DepthToSpace = 49, |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 147 | InstanceNormalization = 50, |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 148 | LogSoftmax = 51, |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 149 | Comparison = 52, |
| 150 | StandIn = 53 |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | // Base layer table to be used as part of other layers |
| 154 | table LayerBase { |
| 155 | index:uint; |
| 156 | layerName:string; |
| 157 | layerType:LayerType; |
| 158 | inputSlots:[InputSlot]; |
| 159 | outputSlots:[OutputSlot]; |
| 160 | } |
| 161 | |
| 162 | table BindableLayerBase { |
| 163 | base:LayerBase; |
| 164 | layerBindingId:int; |
| 165 | } |
| 166 | |
| 167 | // Table for each layer defined below |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 168 | |
| 169 | table AbsLayer { |
| 170 | base:LayerBase; |
| 171 | } |
| 172 | |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 173 | table ActivationLayer { |
| 174 | base:LayerBase; |
| 175 | descriptor:ActivationDescriptor; |
| 176 | } |
| 177 | |
| 178 | table ActivationDescriptor { |
Tee Jung | 86bc3d8 | 2019-10-01 11:25:56 +0900 | [diff] [blame] | 179 | activationFunction:ActivationFunction = Sigmoid; |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 180 | a:float; |
| 181 | b:float; |
| 182 | } |
| 183 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 184 | table AdditionLayer { |
| 185 | base:LayerBase; |
| 186 | } |
| 187 | |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 188 | table ArgMinMaxLayer { |
| 189 | base:LayerBase; |
| 190 | descriptor:ArgMinMaxDescriptor; |
| 191 | } |
| 192 | |
| 193 | table ArgMinMaxDescriptor{ |
Tee Jung | 86bc3d8 | 2019-10-01 11:25:56 +0900 | [diff] [blame] | 194 | argMinMaxFunction:ArgMinMaxFunction; |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 195 | axis:int; |
| 196 | } |
| 197 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 198 | enum ComparisonOperation : byte { |
| 199 | Equal = 0, |
| 200 | Greater = 1, |
| 201 | GreaterOrEqual = 2, |
| 202 | Less = 3, |
| 203 | LessOrEqual = 4, |
| 204 | NotEqual = 5 |
| 205 | } |
| 206 | |
| 207 | table ComparisonDescriptor { |
| 208 | operation:ComparisonOperation; |
| 209 | } |
| 210 | |
| 211 | table ComparisonLayer { |
| 212 | base:LayerBase; |
| 213 | descriptor:ComparisonDescriptor; |
| 214 | } |
| 215 | |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 216 | table ConstantLayer { |
| 217 | base:LayerBase; |
| 218 | input:ConstTensor; |
| 219 | } |
| 220 | |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 221 | table Convolution2dLayer { |
| 222 | base:LayerBase; |
| 223 | descriptor:Convolution2dDescriptor; |
| 224 | weights:ConstTensor; |
| 225 | biases:ConstTensor; |
| 226 | } |
| 227 | |
| 228 | table Convolution2dDescriptor { |
| 229 | padLeft:uint; |
| 230 | padRight:uint; |
| 231 | padTop:uint; |
| 232 | padBottom:uint; |
| 233 | strideX:uint; |
| 234 | strideY:uint; |
Matthew Bentham | acad04e | 2019-05-13 10:02:45 +0100 | [diff] [blame] | 235 | dilationX:uint = 1; |
| 236 | dilationY:uint = 1; |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 237 | biasEnabled:bool = false; |
| 238 | dataLayout:DataLayout = NCHW; |
| 239 | } |
| 240 | |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 241 | table DepthToSpaceLayer { |
| 242 | base:LayerBase; |
| 243 | descriptor:DepthToSpaceDescriptor; |
| 244 | } |
| 245 | |
| 246 | table DepthToSpaceDescriptor { |
| 247 | blockSize:uint; |
| 248 | dataLayout:DataLayout; |
| 249 | } |
| 250 | |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 251 | table DivisionLayer { |
| 252 | base:LayerBase; |
| 253 | } |
| 254 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 255 | /// @deprecated Use ComparisonLayer instead |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 256 | table EqualLayer { |
| 257 | base:LayerBase; |
| 258 | } |
| 259 | |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 260 | table FloorLayer{ |
| 261 | base:LayerBase; |
| 262 | } |
| 263 | |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 264 | table FullyConnectedLayer { |
| 265 | base:LayerBase; |
| 266 | descriptor:FullyConnectedDescriptor; |
| 267 | weights:ConstTensor; |
| 268 | biases:ConstTensor; |
| 269 | } |
| 270 | |
| 271 | table FullyConnectedDescriptor { |
| 272 | biasEnabled:bool = false; |
| 273 | transposeWeightsMatrix:bool = false; |
| 274 | } |
| 275 | |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 276 | table GatherLayer { |
| 277 | base:LayerBase; |
| 278 | } |
| 279 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 280 | /// @deprecated Use ComparisonLayer instead |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 281 | table GreaterLayer { |
| 282 | base:LayerBase; |
| 283 | } |
| 284 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 285 | table InputLayer { |
| 286 | base:BindableLayerBase; |
| 287 | } |
| 288 | |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 289 | table InstanceNormalizationLayer { |
| 290 | base:LayerBase; |
| 291 | descriptor:InstanceNormalizationDescriptor; |
| 292 | } |
| 293 | |
| 294 | table InstanceNormalizationDescriptor { |
| 295 | gamma:float; |
| 296 | beta:float; |
| 297 | eps:float; |
| 298 | dataLayout:DataLayout; |
| 299 | } |
| 300 | |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 301 | table LogSoftmaxLayer { |
| 302 | base:LayerBase; |
| 303 | descriptor:LogSoftmaxDescriptor; |
| 304 | } |
| 305 | |
| 306 | table LogSoftmaxDescriptor { |
| 307 | beta:float = 1; |
| 308 | axis:int = -1; |
| 309 | } |
| 310 | |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 311 | table L2NormalizationLayer { |
| 312 | base:LayerBase; |
| 313 | descriptor:L2NormalizationDescriptor; |
| 314 | } |
| 315 | |
| 316 | table L2NormalizationDescriptor { |
| 317 | dataLayout:DataLayout = NCHW; |
Ferran Balaguer | 0dcffec | 2019-06-18 16:25:06 +0100 | [diff] [blame] | 318 | eps:float = 1e-12; |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 319 | } |
| 320 | |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 321 | table MinimumLayer { |
| 322 | base:LayerBase; |
| 323 | } |
| 324 | |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 325 | table MaximumLayer { |
| 326 | base:LayerBase; |
| 327 | } |
| 328 | |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 329 | table MultiplicationLayer { |
| 330 | base:LayerBase; |
| 331 | } |
| 332 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 333 | table Pooling2dLayer { |
| 334 | base:LayerBase; |
| 335 | descriptor:Pooling2dDescriptor; |
| 336 | } |
| 337 | |
| 338 | enum PoolingAlgorithm : byte { |
| 339 | Max = 0, |
| 340 | Average = 1, |
| 341 | L2 = 2 |
| 342 | } |
| 343 | |
| 344 | enum OutputShapeRounding : byte { |
| 345 | Floor = 0, |
| 346 | Ceiling = 1 |
| 347 | } |
| 348 | |
| 349 | enum PaddingMethod : byte { |
| 350 | IgnoreValue = 0, |
| 351 | Exclude = 1 |
| 352 | } |
| 353 | |
| 354 | table Pooling2dDescriptor { |
| 355 | poolType:PoolingAlgorithm; |
| 356 | padLeft:uint; |
| 357 | padRight:uint; |
| 358 | padTop:uint; |
| 359 | padBottom:uint; |
| 360 | poolWidth:uint; |
| 361 | poolHeight:uint; |
| 362 | strideX:uint; |
| 363 | strideY:uint; |
| 364 | outputShapeRounding:OutputShapeRounding; |
| 365 | paddingMethod:PaddingMethod; |
| 366 | dataLayout:DataLayout; |
| 367 | } |
| 368 | |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 369 | table QuantizeLayer { |
| 370 | base:LayerBase; |
| 371 | } |
| 372 | |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 373 | table SoftmaxLayer { |
| 374 | base:LayerBase; |
| 375 | descriptor:SoftmaxDescriptor; |
| 376 | } |
| 377 | |
| 378 | table SoftmaxDescriptor { |
| 379 | beta:float; |
| 380 | } |
| 381 | |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 382 | table DepthwiseConvolution2dLayer { |
| 383 | base:LayerBase; |
| 384 | descriptor:DepthwiseConvolution2dDescriptor; |
| 385 | weights:ConstTensor; |
| 386 | biases:ConstTensor; |
| 387 | } |
| 388 | |
| 389 | table DepthwiseConvolution2dDescriptor { |
| 390 | padLeft:uint; |
| 391 | padRight:uint; |
| 392 | padTop:uint; |
| 393 | padBottom:uint; |
| 394 | strideX:uint; |
| 395 | strideY:uint; |
Matthew Bentham | acad04e | 2019-05-13 10:02:45 +0100 | [diff] [blame] | 396 | dilationX:uint = 1; |
| 397 | dilationY:uint = 1; |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 398 | biasEnabled:bool = false; |
| 399 | dataLayout:DataLayout = NCHW; |
| 400 | } |
| 401 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 402 | table OutputLayer { |
| 403 | base:BindableLayerBase; |
| 404 | } |
| 405 | |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 406 | table ReshapeLayer { |
| 407 | base:LayerBase; |
| 408 | descriptor:ReshapeDescriptor; |
| 409 | } |
| 410 | |
| 411 | table ReshapeDescriptor { |
| 412 | targetShape:[uint]; |
| 413 | } |
| 414 | |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 415 | table PermuteLayer { |
| 416 | base:LayerBase; |
| 417 | descriptor:PermuteDescriptor; |
| 418 | } |
| 419 | |
| 420 | table PermuteDescriptor { |
| 421 | dimMappings:[uint]; |
| 422 | } |
| 423 | |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 424 | table SpaceToBatchNdLayer { |
| 425 | base:LayerBase; |
| 426 | descriptor:SpaceToBatchNdDescriptor; |
| 427 | } |
| 428 | |
| 429 | table SpaceToBatchNdDescriptor { |
| 430 | blockShape:[uint]; |
| 431 | padList:[uint]; |
| 432 | dataLayout:DataLayout; |
| 433 | } |
| 434 | |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 435 | table SpaceToDepthLayer { |
| 436 | base:LayerBase; |
| 437 | descriptor:SpaceToDepthDescriptor; |
| 438 | } |
| 439 | |
| 440 | table SpaceToDepthDescriptor { |
| 441 | blockSize:uint; |
| 442 | dataLayout:DataLayout; |
| 443 | } |
| 444 | |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 445 | table SubtractionLayer { |
| 446 | base:LayerBase; |
| 447 | } |
| 448 | |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 449 | table BatchToSpaceNdLayer { |
| 450 | base:LayerBase; |
| 451 | descriptor:BatchToSpaceNdDescriptor; |
| 452 | } |
| 453 | |
| 454 | table BatchToSpaceNdDescriptor { |
| 455 | blockShape:[uint]; |
| 456 | crops:[uint]; |
| 457 | dataLayout:DataLayout; |
| 458 | } |
| 459 | |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 460 | enum NormalizationAlgorithmChannel : byte { |
| 461 | Across = 0, |
| 462 | Within = 1 |
| 463 | } |
| 464 | |
| 465 | enum NormalizationAlgorithmMethod : byte { |
| 466 | LocalBrightness = 0, |
| 467 | LocalContrast = 1 |
| 468 | } |
| 469 | |
| 470 | table NormalizationLayer { |
| 471 | base:LayerBase; |
| 472 | descriptor:NormalizationDescriptor; |
| 473 | } |
| 474 | |
| 475 | table NormalizationDescriptor { |
| 476 | normChannelType:NormalizationAlgorithmChannel = Across; |
| 477 | normMethodType:NormalizationAlgorithmMethod = LocalBrightness; |
| 478 | normSize:uint; |
| 479 | alpha:float; |
| 480 | beta:float; |
| 481 | k:float; |
| 482 | dataLayout:DataLayout = NCHW; |
| 483 | } |
| 484 | |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 485 | table MeanLayer { |
| 486 | base:LayerBase; |
| 487 | descriptor:MeanDescriptor; |
| 488 | } |
| 489 | |
| 490 | table MeanDescriptor { |
| 491 | axis:[uint]; |
| 492 | keepDims:bool = false; |
| 493 | } |
| 494 | |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 495 | table PadLayer { |
| 496 | base:LayerBase; |
| 497 | descriptor:PadDescriptor; |
| 498 | } |
| 499 | |
| 500 | table PadDescriptor { |
| 501 | padList:[uint]; |
David Monahan | 3475781 | 2019-06-19 11:47:21 +0100 | [diff] [blame] | 502 | padValue:float = 0; |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 503 | } |
| 504 | |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 505 | table RsqrtLayer { |
| 506 | base:LayerBase; |
| 507 | } |
| 508 | |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 509 | table BatchNormalizationLayer { |
| 510 | base:LayerBase; |
| 511 | descriptor:BatchNormalizationDescriptor; |
| 512 | mean:ConstTensor; |
| 513 | variance:ConstTensor; |
| 514 | beta:ConstTensor; |
| 515 | gamma:ConstTensor; |
| 516 | } |
| 517 | |
| 518 | table BatchNormalizationDescriptor { |
| 519 | eps:float; |
| 520 | dataLayout:DataLayout; |
| 521 | } |
| 522 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 523 | /// @deprecated Use ResizeLayer instead |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 524 | table ResizeBilinearLayer { |
| 525 | base:LayerBase; |
| 526 | descriptor:ResizeBilinearDescriptor; |
| 527 | } |
| 528 | |
| 529 | table ResizeBilinearDescriptor { |
| 530 | targetWidth:uint; |
| 531 | targetHeight:uint; |
| 532 | dataLayout:DataLayout; |
| 533 | } |
| 534 | |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 535 | table SliceLayer { |
| 536 | base:LayerBase; |
| 537 | descriptor:SliceDescriptor; |
| 538 | } |
| 539 | |
| 540 | table SliceDescriptor { |
| 541 | begin:[uint]; |
| 542 | size:[uint]; |
| 543 | } |
| 544 | |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 545 | table StridedSliceLayer { |
| 546 | base:LayerBase; |
| 547 | descriptor:StridedSliceDescriptor; |
| 548 | } |
| 549 | |
| 550 | table StridedSliceDescriptor { |
| 551 | begin:[int]; |
| 552 | end:[int]; |
| 553 | stride:[int]; |
| 554 | beginMask:int; |
| 555 | endMask:int; |
| 556 | shrinkAxisMask:int; |
| 557 | ellipsisMask:int; |
| 558 | newAxisMask:int; |
| 559 | dataLayout:DataLayout; |
| 560 | } |
| 561 | |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 562 | table ConcatLayer { |
| 563 | base:LayerBase; |
| 564 | descriptor:OriginsDescriptor; |
| 565 | } |
| 566 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 567 | /// @deprecated Use ConcatLayer instead |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 568 | table MergerLayer { |
| 569 | base:LayerBase; |
| 570 | descriptor:OriginsDescriptor; |
| 571 | } |
| 572 | |
| 573 | table UintVector { |
| 574 | data:[uint]; |
| 575 | } |
| 576 | |
| 577 | table OriginsDescriptor { |
| 578 | concatAxis:uint; |
| 579 | numViews:uint; |
| 580 | numDimensions:uint; |
| 581 | viewOrigins:[UintVector]; |
| 582 | } |
| 583 | |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 584 | table ViewsDescriptor { |
| 585 | origins:OriginsDescriptor; |
| 586 | viewSizes:[UintVector]; |
| 587 | } |
| 588 | |
| 589 | table SplitterLayer { |
| 590 | base:LayerBase; |
| 591 | descriptor:ViewsDescriptor; |
| 592 | } |
| 593 | |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 594 | table DetectionPostProcessLayer { |
| 595 | base:LayerBase; |
| 596 | descriptor:DetectionPostProcessDescriptor; |
| 597 | anchors:ConstTensor; |
| 598 | } |
| 599 | |
| 600 | table DetectionPostProcessDescriptor { |
| 601 | maxDetections:uint; |
| 602 | maxClassesPerDetection:uint; |
| 603 | detectionsPerClass:uint; |
| 604 | nmsScoreThreshold:float; |
| 605 | nmsIouThreshold:float; |
| 606 | numClasses:uint; |
| 607 | useRegularNms:bool; |
| 608 | scaleX:float; |
| 609 | scaleY:float; |
| 610 | scaleW:float; |
| 611 | scaleH:float; |
| 612 | } |
| 613 | |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 614 | table LstmInputParams { |
| 615 | inputToForgetWeights:ConstTensor; |
| 616 | inputToCellWeights:ConstTensor; |
| 617 | inputToOutputWeights:ConstTensor; |
| 618 | recurrentToForgetWeights:ConstTensor; |
| 619 | recurrentToCellWeights:ConstTensor; |
| 620 | recurrentToOutputWeights:ConstTensor; |
| 621 | forgetGateBias:ConstTensor; |
| 622 | cellBias:ConstTensor; |
| 623 | outputGateBias:ConstTensor; |
| 624 | |
| 625 | inputToInputWeights:ConstTensor; |
| 626 | recurrentToInputWeights:ConstTensor; |
| 627 | cellToInputWeights:ConstTensor; |
| 628 | inputGateBias:ConstTensor; |
| 629 | |
| 630 | projectionWeights:ConstTensor; |
| 631 | projectionBias:ConstTensor; |
| 632 | |
| 633 | cellToForgetWeights:ConstTensor; |
| 634 | cellToOutputWeights:ConstTensor; |
Jan Eilers | f8c6297 | 2019-07-17 11:07:49 +0100 | [diff] [blame] | 635 | |
| 636 | inputLayerNormWeights:ConstTensor; |
| 637 | forgetLayerNormWeights:ConstTensor; |
| 638 | cellLayerNormWeights:ConstTensor; |
| 639 | outputLayerNormWeights:ConstTensor; |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 640 | } |
| 641 | |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 642 | table QuantizedLstmInputParams { |
| 643 | inputToInputWeights:ConstTensor; |
| 644 | inputToForgetWeights:ConstTensor; |
| 645 | inputToCellWeights:ConstTensor; |
| 646 | inputToOutputWeights:ConstTensor; |
| 647 | |
| 648 | recurrentToInputWeights:ConstTensor; |
| 649 | recurrentToForgetWeights:ConstTensor; |
| 650 | recurrentToCellWeights:ConstTensor; |
| 651 | recurrentToOutputWeights:ConstTensor; |
| 652 | |
| 653 | inputGateBias:ConstTensor; |
| 654 | forgetGateBias:ConstTensor; |
| 655 | cellBias:ConstTensor; |
| 656 | outputGateBias:ConstTensor; |
| 657 | } |
| 658 | |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 659 | table LstmDescriptor { |
| 660 | activationFunc:uint; |
| 661 | clippingThresCell:float; |
| 662 | clippingThresProj:float; |
| 663 | cifgEnabled:bool = true; |
| 664 | peepholeEnabled:bool = false; |
| 665 | projectionEnabled:bool = false; |
Jan Eilers | f8c6297 | 2019-07-17 11:07:49 +0100 | [diff] [blame] | 666 | layerNormEnabled:bool = false; |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 667 | } |
| 668 | |
| 669 | table LstmLayer { |
| 670 | base:LayerBase; |
| 671 | descriptor:LstmDescriptor; |
| 672 | inputParams:LstmInputParams; |
| 673 | } |
| 674 | |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 675 | table QuantizedLstmLayer { |
| 676 | base:LayerBase; |
| 677 | inputParams:QuantizedLstmInputParams; |
| 678 | } |
| 679 | |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 680 | table DequantizeLayer { |
| 681 | base:LayerBase; |
| 682 | } |
| 683 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 684 | table MergeLayer { |
| 685 | base:LayerBase; |
| 686 | } |
| 687 | |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 688 | table SwitchLayer { |
| 689 | base:LayerBase; |
| 690 | } |
| 691 | |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 692 | table PreluLayer { |
| 693 | base:LayerBase; |
| 694 | } |
| 695 | |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 696 | table TransposeConvolution2dLayer { |
| 697 | base:LayerBase; |
| 698 | descriptor:TransposeConvolution2dDescriptor; |
| 699 | weights:ConstTensor; |
| 700 | biases:ConstTensor; |
| 701 | } |
| 702 | |
| 703 | table TransposeConvolution2dDescriptor { |
| 704 | padLeft:uint; |
| 705 | padRight:uint; |
| 706 | padTop:uint; |
| 707 | padBottom:uint; |
| 708 | strideX:uint; |
| 709 | strideY:uint; |
| 710 | biasEnabled:bool = false; |
| 711 | dataLayout:DataLayout = NCHW; |
| 712 | } |
| 713 | |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 714 | table ResizeLayer { |
| 715 | base:LayerBase; |
| 716 | descriptor:ResizeDescriptor; |
| 717 | } |
| 718 | |
| 719 | table ResizeDescriptor { |
| 720 | targetHeight:uint; |
| 721 | targetWidth:uint; |
| 722 | method:ResizeMethod = NearestNeighbor; |
| 723 | dataLayout:DataLayout; |
| 724 | } |
| 725 | |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 726 | table StackLayer { |
| 727 | base:LayerBase; |
| 728 | descriptor:StackDescriptor; |
| 729 | } |
| 730 | |
| 731 | table StackDescriptor { |
| 732 | axis:uint; |
| 733 | numInputs:uint; |
| 734 | inputShape:[uint]; |
| 735 | } |
| 736 | |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 737 | table StandInDescriptor { |
| 738 | numInputs:uint; |
| 739 | numOutputs:uint; |
| 740 | } |
| 741 | |
| 742 | table StandInLayer { |
| 743 | base:LayerBase; |
| 744 | descriptor:StandInDescriptor; |
| 745 | } |
| 746 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 747 | union Layer { |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 748 | ActivationLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 749 | AdditionLayer, |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 750 | BatchToSpaceNdLayer, |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 751 | BatchNormalizationLayer, |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 752 | ConstantLayer, |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 753 | Convolution2dLayer, |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 754 | DepthwiseConvolution2dLayer, |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 755 | FullyConnectedLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 756 | InputLayer, |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 757 | MultiplicationLayer, |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 758 | OutputLayer, |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 759 | PermuteLayer, |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 760 | Pooling2dLayer, |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 761 | ReshapeLayer, |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 762 | SoftmaxLayer, |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 763 | SpaceToBatchNdLayer, |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 764 | DivisionLayer, |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 765 | MinimumLayer, |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 766 | EqualLayer, |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 767 | MaximumLayer, |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 768 | NormalizationLayer, |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 769 | PadLayer, |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 770 | RsqrtLayer, |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 771 | FloorLayer, |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 772 | GreaterLayer, |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 773 | ResizeBilinearLayer, |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 774 | SubtractionLayer, |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 775 | StridedSliceLayer, |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 776 | GatherLayer, |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 777 | MeanLayer, |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 778 | MergerLayer, |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 779 | L2NormalizationLayer, |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 780 | SplitterLayer, |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 781 | DetectionPostProcessLayer, |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 782 | LstmLayer, |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 783 | QuantizedLstmLayer, |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 784 | QuantizeLayer, |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 785 | DequantizeLayer, |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 786 | MergeLayer, |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 787 | SwitchLayer, |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 788 | ConcatLayer, |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 789 | SpaceToDepthLayer, |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 790 | PreluLayer, |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 791 | TransposeConvolution2dLayer, |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 792 | ResizeLayer, |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 793 | StackLayer, |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 794 | AbsLayer, |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 795 | ArgMinMaxLayer, |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 796 | SliceLayer, |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 797 | DepthToSpaceLayer, |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 798 | InstanceNormalizationLayer, |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 799 | LogSoftmaxLayer, |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 800 | ComparisonLayer, |
| 801 | StandInLayer |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 802 | } |
| 803 | |
Saoirse Stewart | 49dbe0e | 2019-02-05 17:27:06 +0000 | [diff] [blame] | 804 | table AnyLayer { |
| 805 | layer:Layer; |
| 806 | } |
| 807 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 808 | // Root type for serialized data is the graph of the network |
| 809 | table SerializedGraph { |
Saoirse Stewart | 49dbe0e | 2019-02-05 17:27:06 +0000 | [diff] [blame] | 810 | layers:[AnyLayer]; |
Mike Kelly | 8c1701a | 2019-02-11 17:01:27 +0000 | [diff] [blame] | 811 | inputIds:[uint]; |
| 812 | outputIds:[uint]; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 813 | } |
| 814 | |
| 815 | root_type SerializedGraph; |