Ryan OShea | 2bbfaa7 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 1 | /// Copyright (c) 2020 ARM Limited. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 2 | /// |
| 3 | /// SPDX-License-Identifier: MIT |
| 4 | /// |
| 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | /// of this software and associated documentation files (the "Software"), to deal |
| 7 | /// in the Software without restriction, including without limitation the rights |
| 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | /// copies of the Software, and to permit persons to whom the Software is |
| 10 | /// furnished to do so, subject to the following conditions: |
| 11 | /// |
| 12 | /// The above copyright notice and this permission notice shall be included in all |
| 13 | /// copies or substantial portions of the Software. |
| 14 | /// |
| 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | /// SOFTWARE. |
| 22 | /// |
| 23 | |
| 24 | namespace armnn |
| 25 | { |
| 26 | /** |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 27 | @page serializer Serializer |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 28 | @tableofcontents |
| 29 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 30 | The `armnnSerializer` is a library for serializing an Arm NN network to a stream. |
| 31 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 32 | @section serializersupport Supported Layers |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 33 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 34 | This reference guide provides a list of layers which can be serialized by the Arm NN SDK. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 35 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 36 | @subsection serializersupportflully Fully supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 37 | |
| 38 | The Arm NN SDK Serializer currently supports the following layers: |
| 39 | |
| 40 | - Activation |
| 41 | - Addition |
| 42 | - ArgMinMax |
| 43 | - BatchToSpaceNd |
| 44 | - BatchNormalization |
| 45 | - Comparison |
| 46 | - Concat |
| 47 | - Constant |
| 48 | - Convolution2d |
| 49 | - DepthToSpace |
| 50 | - DepthwiseConvolution2d |
| 51 | - Dequantize |
| 52 | - DetectionPostProcess |
| 53 | - Division |
| 54 | - ElementwiseUnary |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 55 | - Fill |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 56 | - Floor |
| 57 | - FullyConnected |
| 58 | - Gather |
| 59 | - Input |
| 60 | - InstanceNormalization |
| 61 | - L2Normalization |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 62 | - Logical |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 63 | - LogSoftmax |
| 64 | - Lstm |
| 65 | - Maximum |
| 66 | - Mean |
| 67 | - Merge |
| 68 | - Minimum |
| 69 | - Multiplication |
| 70 | - Normalization |
| 71 | - Output |
| 72 | - Pad |
| 73 | - Permute |
| 74 | - Pooling2d |
| 75 | - Prelu |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 76 | - QLstm |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 77 | - Quantize |
| 78 | - QuantizedLstm |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 79 | - Rank |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 80 | - Reshape |
| 81 | - Resize |
| 82 | - Slice |
| 83 | - Softmax |
| 84 | - SpaceToBatchNd |
| 85 | - SpaceToDepth |
| 86 | - Splitter |
| 87 | - Stack |
| 88 | - StandIn |
| 89 | - StridedSlice |
| 90 | - Subtraction |
| 91 | - Switch |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 92 | - Transpose |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 93 | - TransposeConvolution2d |
| 94 | |
| 95 | More machine learning layers will be supported in future releases. |
| 96 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 97 | @subsection serializersupportdeprecated Deprecated layers |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 98 | |
| 99 | Some layers have been deprecated and replaced by others layers. In order to maintain backward compatibility, serializations of these deprecated layers will deserialize to the layers that have replaced them, as follows: |
| 100 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 101 | - Abs will deserialize as ElementwiseUnary |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 102 | - Equal will deserialize as Comparison |
| 103 | - Greater will deserialize as Comparison |
| 104 | - Merger will deserialize as Concat |
| 105 | - ResizeBilinear will deserialize as Resize |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 106 | - Rsqrt will deserialize as ElementwiseUnary |
| 107 | <br/><br/><br/><br/> |
| 108 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 109 | @page deserializer Deserializer |
| 110 | @tableofcontents |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 111 | |
| 112 | The `armnnDeserializer` is a library for loading neural networks defined by Arm NN FlatBuffers files |
| 113 | into the Arm NN runtime. |
| 114 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 115 | @section deserializersupport Supported Layers |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 116 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 117 | This reference guide provides a list of layers which can be deserialized by the Arm NN SDK. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 118 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 119 | @subsection deserializersupportfully Fully supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 120 | |
| 121 | The Arm NN SDK Deserialize parser currently supports the following layers: |
| 122 | |
| 123 | - Abs |
| 124 | - Activation |
| 125 | - Addition |
| 126 | - ArgMinMax |
| 127 | - BatchToSpaceNd |
| 128 | - BatchNormalization |
| 129 | - Concat |
| 130 | - Comparison |
| 131 | - Constant |
| 132 | - Convolution2d |
| 133 | - DepthToSpace |
| 134 | - DepthwiseConvolution2d |
| 135 | - Dequantize |
| 136 | - DetectionPostProcess |
| 137 | - Division |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 138 | - ElementwiseUnary |
| 139 | - Fill |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 140 | - Floor |
| 141 | - FullyConnected |
| 142 | - Gather |
| 143 | - Input |
| 144 | - InstanceNormalization |
| 145 | - L2Normalization |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 146 | - Logical |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 147 | - LogSoftmax |
| 148 | - Lstm |
| 149 | - Maximum |
| 150 | - Mean |
| 151 | - Merge |
| 152 | - Minimum |
| 153 | - Multiplication |
| 154 | - Normalization |
| 155 | - Output |
| 156 | - Pad |
| 157 | - Permute |
| 158 | - Pooling2d |
| 159 | - Prelu |
| 160 | - Quantize |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 161 | - QLstm |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 162 | - QuantizedLstm |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 163 | - Rank |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 164 | - Reshape |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 165 | - Resize |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 166 | - ResizeBilinear |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 167 | - Rsqrt |
| 168 | - Slice |
| 169 | - Softmax |
| 170 | - SpaceToBatchNd |
| 171 | - SpaceToDepth |
| 172 | - Splitter |
| 173 | - Stack |
| 174 | - StandIn |
| 175 | - StridedSlice |
| 176 | - Subtraction |
| 177 | - Switch |
| 178 | - TransposeConvolution2d |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 179 | |
| 180 | More machine learning layers will be supported in future releases. |
| 181 | |
Jan Eilers | 1ed388f | 2021-01-28 14:45:09 +0000 | [diff] [blame^] | 182 | @subsection deserializersupportdeprecated Deprecated layers |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 183 | |
| 184 | Some layers have been deprecated and replaced by others layers. In order to maintain backward compatibility, serializations of these deprecated layers will deserialize to the layers that have replaced them, as follows: |
| 185 | |
| 186 | - Equal will deserialize as Comparison |
| 187 | - Merger will deserialize as Concat |
| 188 | - Greater will deserialize as Comparison |
| 189 | - ResizeBilinear will deserialize as Resize |
| 190 | |
| 191 | **/ |
| 192 | } |