Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1 | // |
Mike Kelly | 3ec3077 | 2023-03-08 13:47:17 +0000 | [diff] [blame] | 2 | // Copyright © 2017,2019-2023 Arm Ltd and Contributors. All rights reserved. |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 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, |
David Monahan | 3b3c381 | 2020-02-25 09:03:29 +0000 | [diff] [blame] | 22 | Square = 9, |
Colm Donelan | 03fbeaf | 2020-02-26 15:39:23 +0000 | [diff] [blame] | 23 | Elu = 10, |
Teresa Charlin | 077cddb | 2023-09-15 15:19:21 +0100 | [diff] [blame] | 24 | HardSwish = 11, |
| 25 | Gelu = 12 |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 26 | } |
| 27 | |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 28 | enum ArgMinMaxFunction : byte { |
| 29 | Min = 0, |
| 30 | Max = 1 |
| 31 | } |
| 32 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 33 | enum DataType : byte { |
| 34 | Float16 = 0, |
| 35 | Float32 = 1, |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 36 | QuantisedAsymm8 = 2, // deprecated |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 37 | Signed32 = 3, |
Nattapat Chaimanowong | cd5ac23 | 2019-03-19 12:26:36 +0000 | [diff] [blame] | 38 | Boolean = 4, |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 39 | QuantisedSymm16 = 5, // deprecated |
| 40 | QAsymmU8 = 6, |
Francis Murtagh | ddb1d06 | 2020-03-10 13:51:45 +0000 | [diff] [blame] | 41 | QSymmS16 = 7, |
Sadik Armagan | 1a84fe3 | 2020-03-27 15:56:57 +0000 | [diff] [blame] | 42 | QAsymmS8 = 8, |
Mike Kelly | 1f140f7 | 2021-04-06 12:25:55 +0100 | [diff] [blame] | 43 | QSymmS8 = 9, |
| 44 | Signed64 = 10 |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 45 | } |
| 46 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 47 | enum DataLayout : byte { |
| 48 | NHWC = 0, |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 49 | NCHW = 1, |
Matthew Sloyan | 5d7b0a3 | 2021-10-18 13:07:49 +0100 | [diff] [blame] | 50 | NDHWC = 2, |
| 51 | NCDHW = 3 |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 52 | } |
| 53 | |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 54 | enum ReduceOperation: byte { |
| 55 | Sum = 0, |
| 56 | Max = 1, |
| 57 | Mean = 2, |
Teresa Charlin | 4e3e831 | 2021-08-05 12:34:37 +0100 | [diff] [blame] | 58 | Min = 3, |
| 59 | Prod = 4 |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 60 | } |
| 61 | |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 62 | enum ResizeMethod: byte { |
| 63 | NearestNeighbor = 0, |
| 64 | Bilinear = 1, |
| 65 | } |
| 66 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 67 | table TensorInfo { |
| 68 | dimensions:[uint]; |
| 69 | dataType:DataType; |
Sadik Armagan | 1a84fe3 | 2020-03-27 15:56:57 +0000 | [diff] [blame] | 70 | quantizationScale:float = 1.0; // @deprecated Use quantizationScales instead |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 71 | quantizationOffset:int = 0; |
Sadik Armagan | 1a84fe3 | 2020-03-27 15:56:57 +0000 | [diff] [blame] | 72 | quantizationScales:[float]; |
| 73 | quantizationDim:uint; |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 74 | dimensionality:uint = 1; |
Colm Donelan | 800b281 | 2021-02-12 12:43:35 +0000 | [diff] [blame] | 75 | dimensionSpecificity:[bool]; |
Matthew Sloyan | 81beae3 | 2021-07-13 19:46:11 +0100 | [diff] [blame] | 76 | isConstant:bool = false; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | struct Connection { |
| 80 | sourceLayerIndex:uint; |
| 81 | outputSlotIndex:uint; |
| 82 | } |
| 83 | |
| 84 | table ByteData { |
| 85 | data:[byte]; |
| 86 | } |
| 87 | |
| 88 | table ShortData { |
| 89 | data:[short]; |
| 90 | } |
| 91 | |
| 92 | table IntData { |
| 93 | data:[int]; |
| 94 | } |
| 95 | |
| 96 | table LongData { |
| 97 | data:[long]; |
| 98 | } |
| 99 | |
| 100 | union ConstTensorData { ByteData, ShortData, IntData, LongData } |
| 101 | |
| 102 | table ConstTensor { |
| 103 | info:TensorInfo; |
| 104 | data:ConstTensorData; |
| 105 | } |
| 106 | |
| 107 | table InputSlot { |
| 108 | index:uint; |
| 109 | connection:Connection; |
Mike Kelly | 4cc341c | 2023-07-07 15:43:06 +0100 | [diff] [blame] | 110 | isOverridden:bool; |
| 111 | overriddenTensorInfo:TensorInfo; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | table OutputSlot { |
| 115 | index:uint; |
| 116 | tensorInfo:TensorInfo; |
| 117 | } |
| 118 | |
| 119 | enum LayerType : uint { |
| 120 | Addition = 0, |
| 121 | Input = 1, |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 122 | Multiplication = 2, |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 123 | Output = 3, |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 124 | Pooling2d = 4, |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 125 | Reshape = 5, |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 126 | Softmax = 6, |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 127 | Convolution2d = 7, |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 128 | DepthwiseConvolution2d = 8, |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 129 | Activation = 9, |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 130 | Permute = 10, |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 131 | FullyConnected = 11, |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 132 | Constant = 12, |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 133 | SpaceToBatchNd = 13, |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 134 | BatchToSpaceNd = 14, |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 135 | Division = 15, |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 136 | Minimum = 16, |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 137 | Equal = 17, |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 138 | Maximum = 18, |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 139 | Normalization = 19, |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 140 | Pad = 20, |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 141 | Rsqrt = 21, |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 142 | Floor = 22, |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 143 | BatchNormalization = 23, |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 144 | Greater = 24, |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 145 | ResizeBilinear = 25, |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 146 | Subtraction = 26, |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 147 | StridedSlice = 27, |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 148 | Gather = 28, |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 149 | Mean = 29, |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 150 | Merger = 30, |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 151 | L2Normalization = 31, |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 152 | Splitter = 32, |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 153 | DetectionPostProcess = 33, |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 154 | Lstm = 34, |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 155 | Quantize = 35, |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 156 | Dequantize = 36, |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 157 | Merge = 37, |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 158 | Switch = 38, |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 159 | Concat = 39, |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 160 | SpaceToDepth = 40, |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 161 | Prelu = 41, |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 162 | TransposeConvolution2d = 42, |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 163 | Resize = 43, |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 164 | Stack = 44, |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 165 | QuantizedLstm = 45, |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 166 | Abs = 46, |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 167 | ArgMinMax = 47, |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 168 | Slice = 48, |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 169 | DepthToSpace = 49, |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 170 | InstanceNormalization = 50, |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 171 | LogSoftmax = 51, |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 172 | Comparison = 52, |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 173 | StandIn = 53, |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 174 | ElementwiseUnary = 54, |
James Conroy | 8d33318 | 2020-05-13 10:27:58 +0100 | [diff] [blame] | 175 | Transpose = 55, |
Keith Davis | 300ad56 | 2020-06-04 16:34:23 +0100 | [diff] [blame] | 176 | QLstm = 56, |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 177 | Fill = 57, |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 178 | Rank = 58, |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 179 | LogicalBinary = 59, |
mathad01 | b392e98 | 2021-04-07 12:07:30 +0100 | [diff] [blame] | 180 | Reduce = 60, |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 181 | Cast = 61, |
Narumol Prangnawarat | a0162e1 | 2021-07-23 14:47:49 +0100 | [diff] [blame] | 182 | Shape = 62, |
| 183 | UnidirectionalSequenceLstm = 63, |
Simon Obute | 51f6777 | 2021-09-03 15:50:13 +0100 | [diff] [blame] | 184 | ChannelShuffle = 64, |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 185 | Convolution3d = 65, |
Tamas Nyiri | d998a1c | 2021-11-05 14:55:33 +0000 | [diff] [blame] | 186 | Pooling3d = 66, |
Teresa Charlin | 6966bfa | 2022-04-25 17:14:50 +0100 | [diff] [blame] | 187 | GatherNd = 67, |
Samuel Yap | a04f4a1 | 2022-08-19 11:14:38 +0100 | [diff] [blame] | 188 | BatchMatMul = 68, |
Mike Kelly | 3ec3077 | 2023-03-08 13:47:17 +0000 | [diff] [blame] | 189 | ElementwiseBinary = 69, |
Tracy Narine | 944fb50 | 2023-07-04 15:08:57 +0100 | [diff] [blame] | 190 | ReverseV2 = 70, |
David Monahan | 616b22f | 2023-07-25 12:08:10 +0100 | [diff] [blame] | 191 | Tile = 71, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | // Base layer table to be used as part of other layers |
| 195 | table LayerBase { |
| 196 | index:uint; |
| 197 | layerName:string; |
| 198 | layerType:LayerType; |
| 199 | inputSlots:[InputSlot]; |
| 200 | outputSlots:[OutputSlot]; |
| 201 | } |
| 202 | |
| 203 | table BindableLayerBase { |
| 204 | base:LayerBase; |
| 205 | layerBindingId:int; |
| 206 | } |
| 207 | |
| 208 | // Table for each layer defined below |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 209 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 210 | /// @deprecated Use ElementwiseUnaryLayer instead |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 211 | table AbsLayer { |
| 212 | base:LayerBase; |
| 213 | } |
| 214 | |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 215 | table ActivationLayer { |
| 216 | base:LayerBase; |
| 217 | descriptor:ActivationDescriptor; |
| 218 | } |
| 219 | |
| 220 | table ActivationDescriptor { |
Tee Jung | 86bc3d8 | 2019-10-01 11:25:56 +0900 | [diff] [blame] | 221 | activationFunction:ActivationFunction = Sigmoid; |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 222 | a:float; |
| 223 | b:float; |
| 224 | } |
| 225 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 226 | table AdditionLayer { |
| 227 | base:LayerBase; |
| 228 | } |
| 229 | |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 230 | table ArgMinMaxLayer { |
| 231 | base:LayerBase; |
| 232 | descriptor:ArgMinMaxDescriptor; |
| 233 | } |
| 234 | |
| 235 | table ArgMinMaxDescriptor{ |
Tee Jung | 86bc3d8 | 2019-10-01 11:25:56 +0900 | [diff] [blame] | 236 | argMinMaxFunction:ArgMinMaxFunction; |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 237 | axis:int; |
| 238 | } |
| 239 | |
mathad01 | b392e98 | 2021-04-07 12:07:30 +0100 | [diff] [blame] | 240 | table CastLayer { |
| 241 | base:LayerBase; |
| 242 | } |
| 243 | |
Simon Obute | 51f6777 | 2021-09-03 15:50:13 +0100 | [diff] [blame] | 244 | table ChannelShuffleLayer { |
| 245 | base:LayerBase; |
| 246 | descriptor:ChannelShuffleDescriptor; |
| 247 | } |
| 248 | |
| 249 | table ChannelShuffleDescriptor { |
| 250 | axis:uint = 0; |
| 251 | numGroups:uint = 0; |
| 252 | } |
| 253 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 254 | enum ComparisonOperation : byte { |
| 255 | Equal = 0, |
| 256 | Greater = 1, |
| 257 | GreaterOrEqual = 2, |
| 258 | Less = 3, |
| 259 | LessOrEqual = 4, |
| 260 | NotEqual = 5 |
| 261 | } |
| 262 | |
| 263 | table ComparisonDescriptor { |
| 264 | operation:ComparisonOperation; |
| 265 | } |
| 266 | |
| 267 | table ComparisonLayer { |
| 268 | base:LayerBase; |
| 269 | descriptor:ComparisonDescriptor; |
| 270 | } |
| 271 | |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 272 | table ConstantLayer { |
| 273 | base:LayerBase; |
| 274 | input:ConstTensor; |
| 275 | } |
| 276 | |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 277 | table Convolution2dLayer { |
| 278 | base:LayerBase; |
| 279 | descriptor:Convolution2dDescriptor; |
| 280 | weights:ConstTensor; |
| 281 | biases:ConstTensor; |
| 282 | } |
| 283 | |
| 284 | table Convolution2dDescriptor { |
| 285 | padLeft:uint; |
| 286 | padRight:uint; |
| 287 | padTop:uint; |
| 288 | padBottom:uint; |
| 289 | strideX:uint; |
| 290 | strideY:uint; |
Matthew Bentham | acad04e | 2019-05-13 10:02:45 +0100 | [diff] [blame] | 291 | dilationX:uint = 1; |
| 292 | dilationY:uint = 1; |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 293 | biasEnabled:bool = false; |
| 294 | dataLayout:DataLayout = NCHW; |
| 295 | } |
| 296 | |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 297 | table Convolution3dLayer { |
| 298 | base:LayerBase; |
| 299 | descriptor:Convolution3dDescriptor; |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 300 | } |
| 301 | |
| 302 | table 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-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 319 | table DepthToSpaceLayer { |
| 320 | base:LayerBase; |
| 321 | descriptor:DepthToSpaceDescriptor; |
| 322 | } |
| 323 | |
| 324 | table DepthToSpaceDescriptor { |
| 325 | blockSize:uint; |
| 326 | dataLayout:DataLayout; |
| 327 | } |
| 328 | |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 329 | table DivisionLayer { |
| 330 | base:LayerBase; |
| 331 | } |
| 332 | |
Mike Kelly | 3ec3077 | 2023-03-08 13:47:17 +0000 | [diff] [blame] | 333 | enum BinaryOperation : byte { |
| 334 | Add = 0, |
| 335 | Div = 1, |
| 336 | Maximum = 2, |
| 337 | Minimum = 3, |
| 338 | Mul = 4, |
John Mcloughlin | 0ec0087 | 2023-05-15 17:03:49 +0100 | [diff] [blame] | 339 | Sub = 5, |
| 340 | SqDiff = 6, |
| 341 | Power = 7 |
Mike Kelly | 3ec3077 | 2023-03-08 13:47:17 +0000 | [diff] [blame] | 342 | } |
| 343 | |
| 344 | table ElementwiseBinaryDescriptor { |
| 345 | operation:BinaryOperation; |
| 346 | } |
| 347 | |
| 348 | table ElementwiseBinaryLayer { |
| 349 | base:LayerBase; |
| 350 | descriptor:ElementwiseBinaryDescriptor; |
| 351 | } |
| 352 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 353 | enum UnaryOperation : byte { |
| 354 | Abs = 0, |
| 355 | Rsqrt = 1, |
| 356 | Sqrt = 2, |
| 357 | Exp = 3, |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 358 | Neg = 4, |
Teresa Charlin | 50de4fa | 2021-05-31 18:47:33 +0100 | [diff] [blame] | 359 | LogicalNot = 5, |
| 360 | Log = 6, |
Teresa Charlin | 93f0ad0 | 2023-03-23 15:28:02 +0000 | [diff] [blame] | 361 | Sin = 7, |
| 362 | Ceil = 8 |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 363 | } |
| 364 | |
| 365 | table ElementwiseUnaryDescriptor { |
| 366 | operation:UnaryOperation; |
| 367 | } |
| 368 | |
| 369 | table ElementwiseUnaryLayer { |
| 370 | base:LayerBase; |
| 371 | descriptor:ElementwiseUnaryDescriptor; |
| 372 | } |
| 373 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 374 | /// @deprecated Use ComparisonLayer instead |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 375 | table EqualLayer { |
| 376 | base:LayerBase; |
| 377 | } |
| 378 | |
Keith Davis | 300ad56 | 2020-06-04 16:34:23 +0100 | [diff] [blame] | 379 | table FillLayer { |
| 380 | base:LayerBase; |
| 381 | descriptor:FillDescriptor; |
| 382 | } |
| 383 | |
| 384 | table FillDescriptor { |
| 385 | value:float; |
| 386 | } |
| 387 | |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 388 | table FloorLayer{ |
| 389 | base:LayerBase; |
| 390 | } |
| 391 | |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 392 | table FullyConnectedLayer { |
| 393 | base:LayerBase; |
| 394 | descriptor:FullyConnectedDescriptor; |
Matthew Sloyan | 81beae3 | 2021-07-13 19:46:11 +0100 | [diff] [blame] | 395 | weights:ConstTensor; // ConstTensors are now passed as inputs. |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 396 | biases:ConstTensor; |
| 397 | } |
| 398 | |
| 399 | table FullyConnectedDescriptor { |
| 400 | biasEnabled:bool = false; |
| 401 | transposeWeightsMatrix:bool = false; |
Sadik Armagan | f0a6dec | 2021-03-25 07:46:55 +0000 | [diff] [blame] | 402 | constantWeights:bool = true; |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 403 | } |
| 404 | |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 405 | table GatherLayer { |
| 406 | base:LayerBase; |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 407 | descriptor:GatherDescriptor; |
| 408 | } |
| 409 | |
| 410 | table GatherDescriptor { |
| 411 | axis:int = 0; |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 412 | } |
| 413 | |
Teresa Charlin | 6966bfa | 2022-04-25 17:14:50 +0100 | [diff] [blame] | 414 | table GatherNdLayer { |
| 415 | base:LayerBase; |
| 416 | } |
| 417 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 418 | /// @deprecated Use ComparisonLayer instead |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 419 | table GreaterLayer { |
| 420 | base:LayerBase; |
| 421 | } |
| 422 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 423 | table InputLayer { |
| 424 | base:BindableLayerBase; |
| 425 | } |
| 426 | |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 427 | table InstanceNormalizationLayer { |
| 428 | base:LayerBase; |
| 429 | descriptor:InstanceNormalizationDescriptor; |
| 430 | } |
| 431 | |
| 432 | table InstanceNormalizationDescriptor { |
| 433 | gamma:float; |
| 434 | beta:float; |
| 435 | eps:float; |
| 436 | dataLayout:DataLayout; |
| 437 | } |
| 438 | |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 439 | table LogSoftmaxLayer { |
| 440 | base:LayerBase; |
| 441 | descriptor:LogSoftmaxDescriptor; |
| 442 | } |
| 443 | |
| 444 | table LogSoftmaxDescriptor { |
| 445 | beta:float = 1; |
| 446 | axis:int = -1; |
| 447 | } |
| 448 | |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 449 | table L2NormalizationLayer { |
| 450 | base:LayerBase; |
| 451 | descriptor:L2NormalizationDescriptor; |
| 452 | } |
| 453 | |
| 454 | table L2NormalizationDescriptor { |
| 455 | dataLayout:DataLayout = NCHW; |
Ferran Balaguer | 0dcffec | 2019-06-18 16:25:06 +0100 | [diff] [blame] | 456 | eps:float = 1e-12; |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 457 | } |
| 458 | |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 459 | enum LogicalBinaryOperation : byte { |
| 460 | LogicalAnd = 0, |
| 461 | LogicalOr = 1 |
| 462 | } |
| 463 | |
| 464 | table LogicalBinaryDescriptor { |
| 465 | operation:LogicalBinaryOperation; |
| 466 | } |
| 467 | |
| 468 | table LogicalBinaryLayer { |
| 469 | base:LayerBase; |
| 470 | descriptor:LogicalBinaryDescriptor; |
| 471 | } |
| 472 | |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 473 | table MinimumLayer { |
| 474 | base:LayerBase; |
| 475 | } |
| 476 | |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 477 | table MaximumLayer { |
| 478 | base:LayerBase; |
| 479 | } |
| 480 | |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 481 | table MultiplicationLayer { |
| 482 | base:LayerBase; |
| 483 | } |
| 484 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 485 | table Pooling2dLayer { |
| 486 | base:LayerBase; |
| 487 | descriptor:Pooling2dDescriptor; |
| 488 | } |
| 489 | |
Tamas Nyiri | d998a1c | 2021-11-05 14:55:33 +0000 | [diff] [blame] | 490 | table Pooling3dLayer { |
| 491 | base:LayerBase; |
| 492 | descriptor:Pooling3dDescriptor; |
| 493 | } |
| 494 | |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 495 | enum PoolingAlgorithm : byte { |
| 496 | Max = 0, |
| 497 | Average = 1, |
| 498 | L2 = 2 |
| 499 | } |
| 500 | |
| 501 | enum OutputShapeRounding : byte { |
| 502 | Floor = 0, |
| 503 | Ceiling = 1 |
| 504 | } |
| 505 | |
| 506 | enum PaddingMethod : byte { |
| 507 | IgnoreValue = 0, |
| 508 | Exclude = 1 |
| 509 | } |
| 510 | |
| 511 | table 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 Nyiri | d998a1c | 2021-11-05 14:55:33 +0000 | [diff] [blame] | 526 | table 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 Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 545 | table QuantizeLayer { |
| 546 | base:LayerBase; |
| 547 | } |
| 548 | |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 549 | table SoftmaxLayer { |
| 550 | base:LayerBase; |
| 551 | descriptor:SoftmaxDescriptor; |
| 552 | } |
| 553 | |
| 554 | table SoftmaxDescriptor { |
| 555 | beta:float; |
Sadik Armagan | fd0cae3 | 2021-11-08 17:18:31 +0000 | [diff] [blame] | 556 | axis:int = -1; |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 557 | } |
| 558 | |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 559 | table DepthwiseConvolution2dLayer { |
| 560 | base:LayerBase; |
| 561 | descriptor:DepthwiseConvolution2dDescriptor; |
| 562 | weights:ConstTensor; |
| 563 | biases:ConstTensor; |
| 564 | } |
| 565 | |
| 566 | table DepthwiseConvolution2dDescriptor { |
| 567 | padLeft:uint; |
| 568 | padRight:uint; |
| 569 | padTop:uint; |
| 570 | padBottom:uint; |
| 571 | strideX:uint; |
| 572 | strideY:uint; |
Matthew Bentham | acad04e | 2019-05-13 10:02:45 +0100 | [diff] [blame] | 573 | dilationX:uint = 1; |
| 574 | dilationY:uint = 1; |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 575 | biasEnabled:bool = false; |
| 576 | dataLayout:DataLayout = NCHW; |
| 577 | } |
| 578 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 579 | table OutputLayer { |
| 580 | base:BindableLayerBase; |
| 581 | } |
| 582 | |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 583 | table ReshapeLayer { |
| 584 | base:LayerBase; |
| 585 | descriptor:ReshapeDescriptor; |
| 586 | } |
| 587 | |
| 588 | table ReshapeDescriptor { |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 589 | targetShape:[uint]; |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 590 | } |
| 591 | |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 592 | table PermuteLayer { |
| 593 | base:LayerBase; |
| 594 | descriptor:PermuteDescriptor; |
| 595 | } |
| 596 | |
| 597 | table PermuteDescriptor { |
| 598 | dimMappings:[uint]; |
| 599 | } |
| 600 | |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 601 | table ShapeLayer { |
| 602 | base:LayerBase; |
| 603 | } |
| 604 | |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 605 | table SpaceToBatchNdLayer { |
| 606 | base:LayerBase; |
| 607 | descriptor:SpaceToBatchNdDescriptor; |
| 608 | } |
| 609 | |
| 610 | table SpaceToBatchNdDescriptor { |
| 611 | blockShape:[uint]; |
| 612 | padList:[uint]; |
| 613 | dataLayout:DataLayout; |
| 614 | } |
| 615 | |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 616 | table SpaceToDepthLayer { |
| 617 | base:LayerBase; |
| 618 | descriptor:SpaceToDepthDescriptor; |
| 619 | } |
| 620 | |
| 621 | table SpaceToDepthDescriptor { |
| 622 | blockSize:uint; |
| 623 | dataLayout:DataLayout; |
| 624 | } |
| 625 | |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 626 | table SubtractionLayer { |
| 627 | base:LayerBase; |
| 628 | } |
| 629 | |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 630 | table BatchToSpaceNdLayer { |
| 631 | base:LayerBase; |
| 632 | descriptor:BatchToSpaceNdDescriptor; |
| 633 | } |
| 634 | |
| 635 | table BatchToSpaceNdDescriptor { |
| 636 | blockShape:[uint]; |
| 637 | crops:[uint]; |
| 638 | dataLayout:DataLayout; |
| 639 | } |
| 640 | |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 641 | enum NormalizationAlgorithmChannel : byte { |
| 642 | Across = 0, |
| 643 | Within = 1 |
| 644 | } |
| 645 | |
| 646 | enum NormalizationAlgorithmMethod : byte { |
| 647 | LocalBrightness = 0, |
| 648 | LocalContrast = 1 |
| 649 | } |
| 650 | |
| 651 | table NormalizationLayer { |
| 652 | base:LayerBase; |
| 653 | descriptor:NormalizationDescriptor; |
| 654 | } |
| 655 | |
| 656 | table 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 Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 666 | table MeanLayer { |
| 667 | base:LayerBase; |
| 668 | descriptor:MeanDescriptor; |
| 669 | } |
| 670 | |
| 671 | table MeanDescriptor { |
| 672 | axis:[uint]; |
| 673 | keepDims:bool = false; |
| 674 | } |
| 675 | |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 676 | table PadLayer { |
| 677 | base:LayerBase; |
| 678 | descriptor:PadDescriptor; |
| 679 | } |
| 680 | |
Matthew Sloyan | 2e5d0b2 | 2021-10-21 14:05:31 +0100 | [diff] [blame] | 681 | enum PaddingMode : byte { |
| 682 | Constant = 0, |
| 683 | Reflect = 1, |
| 684 | Symmetric = 2 |
| 685 | } |
| 686 | |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 687 | table PadDescriptor { |
| 688 | padList:[uint]; |
David Monahan | 3475781 | 2019-06-19 11:47:21 +0100 | [diff] [blame] | 689 | padValue:float = 0; |
Matthew Sloyan | 2e5d0b2 | 2021-10-21 14:05:31 +0100 | [diff] [blame] | 690 | paddingMode:PaddingMode = Constant; |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 691 | } |
| 692 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 693 | /// @deprecated Use ElementwiseUnaryLayer instead |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 694 | table RsqrtLayer { |
| 695 | base:LayerBase; |
| 696 | } |
| 697 | |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 698 | table BatchNormalizationLayer { |
| 699 | base:LayerBase; |
| 700 | descriptor:BatchNormalizationDescriptor; |
| 701 | mean:ConstTensor; |
| 702 | variance:ConstTensor; |
| 703 | beta:ConstTensor; |
| 704 | gamma:ConstTensor; |
| 705 | } |
| 706 | |
| 707 | table BatchNormalizationDescriptor { |
| 708 | eps:float; |
| 709 | dataLayout:DataLayout; |
| 710 | } |
| 711 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 712 | /// @deprecated Use ResizeLayer instead |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 713 | table ResizeBilinearLayer { |
| 714 | base:LayerBase; |
| 715 | descriptor:ResizeBilinearDescriptor; |
| 716 | } |
| 717 | |
| 718 | table ResizeBilinearDescriptor { |
| 719 | targetWidth:uint; |
| 720 | targetHeight:uint; |
| 721 | dataLayout:DataLayout; |
David Monahan | 4a0c9b9 | 2020-05-30 09:48:39 +0100 | [diff] [blame] | 722 | alignCorners:bool; |
| 723 | halfPixelCenters:bool; |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 724 | } |
| 725 | |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 726 | table SliceLayer { |
| 727 | base:LayerBase; |
| 728 | descriptor:SliceDescriptor; |
| 729 | } |
| 730 | |
| 731 | table SliceDescriptor { |
| 732 | begin:[uint]; |
| 733 | size:[uint]; |
| 734 | } |
| 735 | |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 736 | table StridedSliceLayer { |
| 737 | base:LayerBase; |
| 738 | descriptor:StridedSliceDescriptor; |
| 739 | } |
| 740 | |
| 741 | table 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 Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 753 | table ConcatLayer { |
| 754 | base:LayerBase; |
| 755 | descriptor:OriginsDescriptor; |
| 756 | } |
| 757 | |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 758 | /// @deprecated Use ConcatLayer instead |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 759 | table MergerLayer { |
| 760 | base:LayerBase; |
| 761 | descriptor:OriginsDescriptor; |
| 762 | } |
| 763 | |
| 764 | table UintVector { |
| 765 | data:[uint]; |
| 766 | } |
| 767 | |
| 768 | table OriginsDescriptor { |
| 769 | concatAxis:uint; |
| 770 | numViews:uint; |
| 771 | numDimensions:uint; |
| 772 | viewOrigins:[UintVector]; |
| 773 | } |
| 774 | |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 775 | table ViewsDescriptor { |
| 776 | origins:OriginsDescriptor; |
| 777 | viewSizes:[UintVector]; |
Mike Kelly | fca5916 | 2023-08-08 12:00:28 +0100 | [diff] [blame] | 778 | hasAxis:bool; |
| 779 | axis:int; |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 780 | } |
| 781 | |
| 782 | table SplitterLayer { |
| 783 | base:LayerBase; |
| 784 | descriptor:ViewsDescriptor; |
| 785 | } |
| 786 | |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 787 | table DetectionPostProcessLayer { |
| 788 | base:LayerBase; |
| 789 | descriptor:DetectionPostProcessDescriptor; |
| 790 | anchors:ConstTensor; |
| 791 | } |
| 792 | |
| 793 | table 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 Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 807 | table 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 Eilers | f8c6297 | 2019-07-17 11:07:49 +0100 | [diff] [blame] | 828 | |
| 829 | inputLayerNormWeights:ConstTensor; |
| 830 | forgetLayerNormWeights:ConstTensor; |
| 831 | cellLayerNormWeights:ConstTensor; |
| 832 | outputLayerNormWeights:ConstTensor; |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 833 | } |
| 834 | |
James Conroy | 8d33318 | 2020-05-13 10:27:58 +0100 | [diff] [blame] | 835 | table 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 | |
| 845 | table LstmLayer { |
| 846 | base:LayerBase; |
| 847 | descriptor:LstmDescriptor; |
| 848 | inputParams:LstmInputParams; |
| 849 | } |
| 850 | |
| 851 | table 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 | |
| 886 | table 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 | |
| 904 | table QLstmLayer { |
| 905 | base:LayerBase; |
| 906 | descriptor:QLstmDescriptor; |
| 907 | inputParams:QLstmInputParams; |
| 908 | } |
| 909 | |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 910 | table 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 Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 927 | table QuantizedLstmLayer { |
| 928 | base:LayerBase; |
| 929 | inputParams:QuantizedLstmInputParams; |
| 930 | } |
| 931 | |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 932 | table DequantizeLayer { |
| 933 | base:LayerBase; |
| 934 | } |
| 935 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 936 | table MergeLayer { |
| 937 | base:LayerBase; |
| 938 | } |
| 939 | |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 940 | table SwitchLayer { |
| 941 | base:LayerBase; |
| 942 | } |
| 943 | |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 944 | table PreluLayer { |
| 945 | base:LayerBase; |
| 946 | } |
| 947 | |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 948 | table TransposeConvolution2dLayer { |
| 949 | base:LayerBase; |
| 950 | descriptor:TransposeConvolution2dDescriptor; |
| 951 | weights:ConstTensor; |
| 952 | biases:ConstTensor; |
| 953 | } |
| 954 | |
| 955 | table 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 Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 966 | table TransposeLayer { |
| 967 | base:LayerBase; |
| 968 | descriptor:TransposeDescriptor; |
| 969 | } |
| 970 | |
| 971 | table TransposeDescriptor { |
| 972 | dimMappings:[uint]; |
| 973 | } |
| 974 | |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 975 | table ResizeLayer { |
| 976 | base:LayerBase; |
| 977 | descriptor:ResizeDescriptor; |
| 978 | } |
| 979 | |
| 980 | table ResizeDescriptor { |
| 981 | targetHeight:uint; |
| 982 | targetWidth:uint; |
| 983 | method:ResizeMethod = NearestNeighbor; |
| 984 | dataLayout:DataLayout; |
David Monahan | 4a0c9b9 | 2020-05-30 09:48:39 +0100 | [diff] [blame] | 985 | alignCorners:bool; |
| 986 | halfPixelCenters:bool; |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 987 | } |
| 988 | |
Tracy Narine | 944fb50 | 2023-07-04 15:08:57 +0100 | [diff] [blame] | 989 | table ReverseV2Layer { |
| 990 | base:LayerBase; |
Tracy Narine | 944fb50 | 2023-07-04 15:08:57 +0100 | [diff] [blame] | 991 | } |
| 992 | |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 993 | table StackLayer { |
| 994 | base:LayerBase; |
| 995 | descriptor:StackDescriptor; |
| 996 | } |
| 997 | |
| 998 | table StackDescriptor { |
| 999 | axis:uint; |
| 1000 | numInputs:uint; |
| 1001 | inputShape:[uint]; |
| 1002 | } |
| 1003 | |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 1004 | table StandInDescriptor { |
| 1005 | numInputs:uint; |
| 1006 | numOutputs:uint; |
| 1007 | } |
| 1008 | |
| 1009 | table StandInLayer { |
| 1010 | base:LayerBase; |
| 1011 | descriptor:StandInDescriptor; |
| 1012 | } |
| 1013 | |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 1014 | table RankLayer { |
| 1015 | base:LayerBase; |
| 1016 | } |
| 1017 | |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 1018 | table ReduceLayer { |
| 1019 | base:LayerBase; |
| 1020 | descriptor:ReduceDescriptor; |
| 1021 | } |
| 1022 | |
| 1023 | table ReduceDescriptor { |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 1024 | keepDims:bool = false; |
| 1025 | axis:[uint]; |
| 1026 | reduceOperation:ReduceOperation = Sum; |
| 1027 | } |
| 1028 | |
Narumol Prangnawarat | a0162e1 | 2021-07-23 14:47:49 +0100 | [diff] [blame] | 1029 | table 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 | |
| 1040 | table UnidirectionalSequenceLstmLayer { |
| 1041 | base:LayerBase; |
| 1042 | descriptor:UnidirectionalSequenceLstmDescriptor; |
| 1043 | inputParams:LstmInputParams; |
| 1044 | } |
| 1045 | |
Samuel Yap | a04f4a1 | 2022-08-19 11:14:38 +0100 | [diff] [blame] | 1046 | table 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 | |
| 1055 | table BatchMatMulLayer { |
| 1056 | base:LayerBase; |
| 1057 | descriptor:BatchMatMulDescriptor; |
| 1058 | } |
| 1059 | |
David Monahan | 616b22f | 2023-07-25 12:08:10 +0100 | [diff] [blame] | 1060 | table TileDescriptor { |
| 1061 | m_Multiples:[uint]; |
| 1062 | } |
| 1063 | |
| 1064 | table TileLayer { |
| 1065 | base:LayerBase; |
| 1066 | descriptor:TileDescriptor; |
| 1067 | } |
| 1068 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1069 | union Layer { |
Mike Kelly | af48401 | 2019-02-20 16:53:11 +0000 | [diff] [blame] | 1070 | ActivationLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1071 | AdditionLayer, |
Nattapat Chaimanowong | 6b4ed98 | 2019-02-26 17:24:13 +0000 | [diff] [blame] | 1072 | BatchToSpaceNdLayer, |
ruoyan01 | 8e7fa23 | 2019-02-28 15:09:07 +0000 | [diff] [blame] | 1073 | BatchNormalizationLayer, |
Conor Kennedy | 7627788 | 2019-02-26 08:29:54 +0000 | [diff] [blame] | 1074 | ConstantLayer, |
Mike Kelly | a0766c3 | 2019-02-19 17:22:07 +0000 | [diff] [blame] | 1075 | Convolution2dLayer, |
Aron Virginas-Tar | c04125f | 2019-02-19 16:31:08 +0000 | [diff] [blame] | 1076 | DepthwiseConvolution2dLayer, |
Sadik Armagan | dbb0c0c | 2019-02-21 09:01:41 +0000 | [diff] [blame] | 1077 | FullyConnectedLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1078 | InputLayer, |
Sadik Armagan | 5f45027 | 2019-02-12 14:31:45 +0000 | [diff] [blame] | 1079 | MultiplicationLayer, |
Aron Virginas-Tar | fc413c0 | 2019-02-13 15:41:52 +0000 | [diff] [blame] | 1080 | OutputLayer, |
Nattapat Chaimanowong | 30b0020 | 2019-02-20 17:31:34 +0000 | [diff] [blame] | 1081 | PermuteLayer, |
Saoirse Stewart | 3166c3e | 2019-02-18 15:24:53 +0000 | [diff] [blame] | 1082 | Pooling2dLayer, |
Saoirse Stewart | 263829c | 2019-02-19 15:54:14 +0000 | [diff] [blame] | 1083 | ReshapeLayer, |
Nattapat Chaimanowong | 4528699 | 2019-02-26 15:53:02 +0000 | [diff] [blame] | 1084 | SoftmaxLayer, |
Éanna Ó Catháin | 5888589 | 2019-02-27 16:16:39 +0000 | [diff] [blame] | 1085 | SpaceToBatchNdLayer, |
Aron Virginas-Tar | 0fe3245 | 2019-02-28 13:12:47 +0000 | [diff] [blame] | 1086 | DivisionLayer, |
Nattapat Chaimanowong | 235cea5 | 2019-02-28 16:27:30 +0000 | [diff] [blame] | 1087 | MinimumLayer, |
Aron Virginas-Tar | 377351e | 2019-02-27 14:42:31 +0000 | [diff] [blame] | 1088 | EqualLayer, |
Nina Drozd | 5772878 | 2019-02-27 10:53:27 +0000 | [diff] [blame] | 1089 | MaximumLayer, |
Nattapat Chaimanowong | ebb0f9c | 2019-03-01 12:14:06 +0000 | [diff] [blame] | 1090 | NormalizationLayer, |
Sadik Armagan | 8b42a38 | 2019-03-01 14:24:49 +0000 | [diff] [blame] | 1091 | PadLayer, |
Finn Williams | dd2ba7e | 2019-03-01 11:51:52 +0000 | [diff] [blame] | 1092 | RsqrtLayer, |
Conor Kennedy | 79ffdf5 | 2019-03-01 14:24:54 +0000 | [diff] [blame] | 1093 | FloorLayer, |
Nattapat Chaimanowong | 6522cdc | 2019-03-01 16:14:13 +0000 | [diff] [blame] | 1094 | GreaterLayer, |
Conor Kennedy | da1f975 | 2019-03-01 14:37:12 +0000 | [diff] [blame] | 1095 | ResizeBilinearLayer, |
Nattapat Chaimanowong | b348521 | 2019-03-04 12:35:39 +0000 | [diff] [blame] | 1096 | SubtractionLayer, |
Saoirse Stewart | a1ed73a | 2019-03-04 13:40:12 +0000 | [diff] [blame] | 1097 | StridedSliceLayer, |
Sadik Armagan | ac97c8c | 2019-03-04 17:44:21 +0000 | [diff] [blame] | 1098 | GatherLayer, |
Jim Flynn | ac25a1b | 2019-02-28 10:40:49 +0000 | [diff] [blame] | 1099 | MeanLayer, |
Narumol Prangnawarat | 495701f | 2019-03-07 17:31:34 +0000 | [diff] [blame] | 1100 | MergerLayer, |
Jim Flynn | 18ce338 | 2019-03-08 11:08:30 +0000 | [diff] [blame] | 1101 | L2NormalizationLayer, |
Nattapat Chaimanowong | 3e14a9d | 2019-03-18 12:37:06 +0000 | [diff] [blame] | 1102 | SplitterLayer, |
Jim Flynn | 11af375 | 2019-03-19 17:22:29 +0000 | [diff] [blame] | 1103 | DetectionPostProcessLayer, |
Derek Lamberti | 87acb27 | 2019-03-27 16:51:31 +0000 | [diff] [blame] | 1104 | LstmLayer, |
Jan Eilers | 5b01a89 | 2019-07-23 09:47:43 +0100 | [diff] [blame] | 1105 | QuantizedLstmLayer, |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 1106 | QuantizeLayer, |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 1107 | DequantizeLayer, |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 1108 | MergeLayer, |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 1109 | SwitchLayer, |
Aron Virginas-Tar | aa06714 | 2019-06-11 16:01:44 +0100 | [diff] [blame] | 1110 | ConcatLayer, |
Ellen Norris-Thompson | 5198247 | 2019-06-19 11:46:21 +0100 | [diff] [blame] | 1111 | SpaceToDepthLayer, |
Aron Virginas-Tar | cb54930 | 2019-06-21 13:53:38 +0100 | [diff] [blame] | 1112 | PreluLayer, |
FinnWilliamsArm | 6fb339a | 2019-06-28 15:07:10 +0100 | [diff] [blame] | 1113 | TransposeConvolution2dLayer, |
Matthew Jackson | b5433ee | 2019-07-11 15:54:20 +0100 | [diff] [blame] | 1114 | ResizeLayer, |
FinnWilliamsArm | 4ffcc8f | 2019-09-05 14:34:20 +0100 | [diff] [blame] | 1115 | StackLayer, |
Narumol Prangnawarat | 0cfcf23 | 2019-09-09 17:16:24 +0100 | [diff] [blame] | 1116 | AbsLayer, |
Aron Virginas-Tar | 2fda80b | 2019-09-18 13:36:52 +0100 | [diff] [blame] | 1117 | ArgMinMaxLayer, |
Aron Virginas-Tar | da9d2d3 | 2019-09-20 10:42:02 +0100 | [diff] [blame] | 1118 | SliceLayer, |
Aron Virginas-Tar | 781ced9 | 2019-10-03 11:15:39 +0100 | [diff] [blame] | 1119 | DepthToSpaceLayer, |
Sadik Armagan | 2625785 | 2019-10-14 13:00:47 +0100 | [diff] [blame] | 1120 | InstanceNormalizationLayer, |
Aron Virginas-Tar | e80ebd1 | 2019-10-17 16:11:54 +0100 | [diff] [blame] | 1121 | LogSoftmaxLayer, |
Aron Virginas-Tar | 85121a2 | 2019-10-23 10:41:35 +0100 | [diff] [blame] | 1122 | ComparisonLayer, |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 1123 | StandInLayer, |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 1124 | ElementwiseUnaryLayer, |
James Conroy | 8d33318 | 2020-05-13 10:27:58 +0100 | [diff] [blame] | 1125 | TransposeLayer, |
Keith Davis | 300ad56 | 2020-06-04 16:34:23 +0100 | [diff] [blame] | 1126 | QLstmLayer, |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 1127 | FillLayer, |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 1128 | RankLayer, |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 1129 | LogicalBinaryLayer, |
mathad01 | b392e98 | 2021-04-07 12:07:30 +0100 | [diff] [blame] | 1130 | ReduceLayer, |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 1131 | CastLayer, |
Narumol Prangnawarat | a0162e1 | 2021-07-23 14:47:49 +0100 | [diff] [blame] | 1132 | ShapeLayer, |
| 1133 | UnidirectionalSequenceLstmLayer, |
Simon Obute | 51f6777 | 2021-09-03 15:50:13 +0100 | [diff] [blame] | 1134 | ChannelShuffleLayer, |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 1135 | Convolution3dLayer, |
Tamas Nyiri | d998a1c | 2021-11-05 14:55:33 +0000 | [diff] [blame] | 1136 | Pooling3dLayer, |
Teresa Charlin | 6966bfa | 2022-04-25 17:14:50 +0100 | [diff] [blame] | 1137 | GatherNdLayer, |
Samuel Yap | a04f4a1 | 2022-08-19 11:14:38 +0100 | [diff] [blame] | 1138 | BatchMatMulLayer, |
Mike Kelly | 3ec3077 | 2023-03-08 13:47:17 +0000 | [diff] [blame] | 1139 | ElementwiseBinaryLayer, |
Tracy Narine | 944fb50 | 2023-07-04 15:08:57 +0100 | [diff] [blame] | 1140 | ReverseV2Layer, |
David Monahan | 616b22f | 2023-07-25 12:08:10 +0100 | [diff] [blame] | 1141 | TileLayer, |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1142 | } |
| 1143 | |
Saoirse Stewart | 49dbe0e | 2019-02-05 17:27:06 +0000 | [diff] [blame] | 1144 | table AnyLayer { |
| 1145 | layer:Layer; |
| 1146 | } |
| 1147 | |
Tee Jung | aa920c5 | 2019-11-05 10:48:25 +0000 | [diff] [blame] | 1148 | table FeatureCompatibilityVersions { |
| 1149 | bindingIdsScheme:uint = 0; |
Jan Eilers | 53ef795 | 2021-06-02 12:01:25 +0100 | [diff] [blame] | 1150 | weightsLayoutScheme:uint = 0; |
Matthew Sloyan | 81beae3 | 2021-07-13 19:46:11 +0100 | [diff] [blame] | 1151 | constantTensorsAsInputs:uint = 0; |
Tee Jung | aa920c5 | 2019-11-05 10:48:25 +0000 | [diff] [blame] | 1152 | } |
| 1153 | |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1154 | // Root type for serialized data is the graph of the network |
| 1155 | table SerializedGraph { |
Saoirse Stewart | 49dbe0e | 2019-02-05 17:27:06 +0000 | [diff] [blame] | 1156 | layers:[AnyLayer]; |
Tee Jung | aa920c5 | 2019-11-05 10:48:25 +0000 | [diff] [blame] | 1157 | inputIds:[int]; |
| 1158 | outputIds:[int]; |
| 1159 | featureVersions:FeatureCompatibilityVersions; |
Nattapat Chaimanowong | 969eea3 | 2019-01-30 13:33:11 +0000 | [diff] [blame] | 1160 | } |
| 1161 | |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 1162 | root_type SerializedGraph; |