Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 1 | /// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 2 | /// |
| 3 | /// SPDX-License-Identifier: MIT |
| 4 | /// |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 5 | |
| 6 | namespace armnn |
| 7 | { |
| 8 | /** |
| 9 | @page parsers Parsers |
| 10 | |
| 11 | @tableofcontents |
Jan Eilers | b657819 | 2021-01-28 09:13:24 +0000 | [diff] [blame] | 12 | Execute models from different machine learning platforms efficiently with our parsers. Simply choose a parser according |
| 13 | to the model you want to run e.g. If you've got a model in tensorflow format (<model_name>.pb) use our tensorflow-parser. |
| 14 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 15 | If you would like to run a Tensorflow Lite (TfLite) model you probably also want to take a look at our @ref delegate. |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 16 | |
| 17 | All parsers are written in C++ but it is also possible to use them in python. For more information on our python |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 18 | bindings take a look into the @ref md_python_pyarmnn_README section. |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 19 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 20 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 21 | |
| 22 | @section S4_caffe_parser Arm NN Caffe Parser |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 23 | |
| 24 | `armnnCaffeParser` is a library for loading neural networks defined in Caffe protobuf files into the Arm NN runtime. |
| 25 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 26 | Please note that certain deprecated Caffe features are not supported by the armnnCaffeParser. If you think that Arm NN |
| 27 | should be able to load your model according to the list of supported layers, but you are getting strange error |
| 28 | messages, then try upgrading your model to the latest format using Caffe, either by saving it to a new file or using |
| 29 | the upgrade utilities in `caffe/tools`. |
| 30 | |
Jan Eilers | b657819 | 2021-01-28 09:13:24 +0000 | [diff] [blame] | 31 | ## Caffe layers supported by the Arm NN SDK |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 32 | This reference guide provides a list of Caffe layers the Arm NN SDK currently supports. |
| 33 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 34 | ### Although some other neural networks might work, Arm tests the Arm NN SDK with Caffe implementations of the following neural networks: |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 35 | |
| 36 | - AlexNet. |
Ryan OShea | 2bbfaa7 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 37 | - Cifar10. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 38 | - Inception-BN. |
| 39 | - Resnet_50, Resnet_101 and Resnet_152. |
| 40 | - VGG_CNN_S, VGG_16 and VGG_19. |
| 41 | - Yolov1_tiny. |
| 42 | - Lenet. |
| 43 | - MobileNetv1. |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 44 | - SqueezeNet v1.0 and SqueezeNet v1.1 |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 45 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 46 | ### The Arm NN SDK supports the following machine learning layers for Caffe networks: |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 47 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 48 | - Argmax, excluding the top_k and out_max_val parameters. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 49 | - BatchNorm, in inference mode. |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 50 | - Convolution, excluding Weight Filler, Bias Filler, Engine, Force nd_im2col, and Axis parameters. |
| 51 | - Deconvolution, excluding the Dilation Size, Weight Filler, Bias Filler, Engine, Force nd_im2col, and Axis parameters. |
| 52 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 53 | Caffe doesn't support depthwise convolution, the equivalent layer is implemented through the notion of groups. ArmNN supports groups this way: |
| 54 | - when group=1, it is a normal conv2d |
| 55 | - when group=#input_channels, we can replace it by a depthwise convolution |
| 56 | - when group>1 && group<#input_channels, we need to split the input into the given number of groups, apply a separate convolution and then merge the results |
| 57 | - Concat, along the channel dimension only. |
| 58 | - Dropout, in inference mode. |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 59 | - Eltwise, excluding the coeff parameter. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 60 | - Inner Product, excluding the Weight Filler, Bias Filler, Engine, and Axis parameters. |
| 61 | - Input. |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 62 | - LRN, excluding the Engine parameter. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 63 | - Pooling, excluding the Stochastic Pooling and Engine parameters. |
| 64 | - ReLU. |
| 65 | - Scale. |
| 66 | - Softmax, excluding the Axis and Engine parameters. |
| 67 | - Split. |
| 68 | |
| 69 | More machine learning layers will be supported in future releases. |
| 70 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 71 | <br/><br/><br/><br/> |
| 72 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 73 | |
| 74 | |
| 75 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 76 | @section S5_onnx_parser ArmNN Onnx Parser |
| 77 | |
| 78 | `armnnOnnxParser` is a library for loading neural networks defined in ONNX protobuf files into the Arm NN runtime. |
| 79 | |
| 80 | ## ONNX operators that the Arm NN SDK supports |
| 81 | |
| 82 | This reference guide provides a list of ONNX operators the Arm NN SDK currently supports. |
| 83 | |
| 84 | The Arm NN SDK ONNX parser currently only supports fp32 operators. |
| 85 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 86 | ### Fully supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 87 | |
| 88 | - Add |
| 89 | - See the ONNX [Add documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Add) for more information |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 90 | |
Ryan OShea | 2bbfaa7 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 91 | - AveragePool |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 92 | - See the ONNX [AveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#AveragePool) for more information. |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 93 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 94 | - Constant |
| 95 | - See the ONNX [Constant documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Constant) for more information. |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 96 | |
| 97 | - Clip |
| 98 | - See the ONNX [Clip documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Clip) for more information. |
| 99 | |
| 100 | - Flatten |
| 101 | - See the ONNX [Flatten documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Flatten) for more information. |
| 102 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 103 | - GlobalAveragePool |
| 104 | - See the ONNX [GlobalAveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GlobalAveragePool) for more information. |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 105 | |
| 106 | - LeakyRelu |
| 107 | - See the ONNX [LeakyRelu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LeakyRelu) for more information. |
| 108 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 109 | - MaxPool |
| 110 | - See the ONNX [max_pool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MaxPool) for more information. |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 111 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 112 | - Relu |
| 113 | - See the ONNX [Relu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Relu) for more information. |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 114 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 115 | - Reshape |
| 116 | - See the ONNX [Reshape documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Reshape) for more information. |
| 117 | |
Ryan OShea | b23b999 | 2020-04-23 15:45:04 +0100 | [diff] [blame] | 118 | - Sigmoid |
| 119 | - See the ONNX [Sigmoid documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Sigmoid) for more information. |
| 120 | |
| 121 | - Tanh |
| 122 | - See the ONNX [Tanh documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Tanh) for more information. |
| 123 | |
| 124 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 125 | ### Partially supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 126 | |
| 127 | - Conv |
| 128 | - The parser only supports 2D convolutions with a dilation rate of [1, 1] and group = 1 or group = #Nb_of_channel (depthwise convolution) |
| 129 | See the ONNX [Conv documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Conv) for more information. |
| 130 | - BatchNormalization |
| 131 | - The parser does not support training mode. See the ONNX [BatchNormalization documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#BatchNormalization) for more information. |
| 132 | - MatMul |
| 133 | - The parser only supports constant weights in a fully connected layer. |
| 134 | |
| 135 | ## Tested networks |
| 136 | |
| 137 | Arm tested these operators with the following ONNX fp32 neural networks: |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 138 | - Mobilenet_v2. See the ONNX [MobileNet documentation](https://github.com/onnx/models/tree/master/vision/classification/mobilenet) for more information. |
| 139 | - Simple MNIST. This is no longer directly documented by ONNX. The model and test data may be downloaded [from the ONNX model zoo](https://onnxzoo.blob.core.windows.net/models/opset_8/mnist/mnist.tar.gz). |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 140 | |
| 141 | More machine learning operators will be supported in future releases. |
| 142 | <br/><br/><br/><br/> |
| 143 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 144 | |
| 145 | |
| 146 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 147 | @section S6_tf_lite_parser ArmNN Tf Lite Parser |
| 148 | |
| 149 | `armnnTfLiteParser` is a library for loading neural networks defined by TensorFlow Lite FlatBuffers files |
| 150 | into the Arm NN runtime. |
| 151 | |
| 152 | ## TensorFlow Lite operators that the Arm NN SDK supports |
| 153 | |
| 154 | This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports. |
| 155 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 156 | ### Fully supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 157 | The Arm NN SDK TensorFlow Lite parser currently supports the following operators: |
| 158 | |
| 159 | - ADD |
| 160 | - AVERAGE_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE |
| 161 | - BATCH_TO_SPACE |
| 162 | - CONCATENATION, Supported Fused Activation: RELU , RELU6 , TANH, NONE |
| 163 | - CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 164 | - DEPTH_TO_SPACE |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 165 | - DEPTHWISE_CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 166 | - DEQUANTIZE |
Darshan Patel | 42b3d7d | 2020-05-25 22:30:07 +0530 | [diff] [blame] | 167 | - DIV |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 168 | - ELU |
Ryan OShea | eb1f9cf | 2020-05-21 17:07:40 +0100 | [diff] [blame] | 169 | - EXP |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 170 | - FULLY_CONNECTED, Supported Fused Activation: RELU , RELU6 , TANH, NONE |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 171 | - GATHER |
| 172 | - HARD_SWISH |
| 173 | - LEAKY_RELU |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 174 | - LOGISTIC |
| 175 | - L2_NORMALIZATION |
| 176 | - MAX_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE |
| 177 | - MAXIMUM |
| 178 | - MEAN |
| 179 | - MINIMUM |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 180 | - MU |
Darshan Patel | 83fcf98 | 2020-05-26 22:22:42 +0530 | [diff] [blame] | 181 | - NEG |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 182 | - PACK |
| 183 | - PAD |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 184 | - QUANTIZE |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 185 | - RELU |
| 186 | - RELU6 |
| 187 | - RESHAPE |
| 188 | - RESIZE_BILINEAR |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 189 | - RESIZE_NEAREST_NEIGHBOR |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 190 | - SLICE |
| 191 | - SOFTMAX |
| 192 | - SPACE_TO_BATCH |
| 193 | - SPLIT |
Ryan OShea | 8670473 | 2020-05-26 11:41:04 +0100 | [diff] [blame] | 194 | - SPLIT_V |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 195 | - SQUEEZE |
| 196 | - STRIDED_SLICE |
| 197 | - SUB |
| 198 | - TANH |
| 199 | - TRANSPOSE |
| 200 | - TRANSPOSE_CONV |
| 201 | - UNPACK |
| 202 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 203 | ### Custom Operator |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 204 | - TFLite_Detection_PostProcess |
| 205 | |
| 206 | ## Tested networks |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 207 | Arm tested these operators with the following TensorFlow Lite neural network: |
| 208 | - [Quantized MobileNet](http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224_quant.tgz) |
| 209 | - [Quantized SSD MobileNet](http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18.tar.gz) |
| 210 | - DeepSpeech v1 converted from [TensorFlow model](https://github.com/mozilla/DeepSpeech/releases/tag/v0.4.1) |
| 211 | - DeepSpeaker |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 212 | - [DeepLab v3+](https://www.tensorflow.org/lite/models/segmentation/overview) |
| 213 | - FSRCNN |
| 214 | - EfficientNet-lite |
| 215 | - RDN converted from [TensorFlow model](https://github.com/hengchuan/RDN-TensorFlow) |
| 216 | - Quantized RDN (CpuRef) |
| 217 | - [Quantized Inception v3](http://download.tensorflow.org/models/tflite_11_05_08/inception_v3_quant.tgz) |
| 218 | - [Quantized Inception v4](http://download.tensorflow.org/models/inception_v4_299_quant_20181026.tgz) (CpuRef) |
| 219 | - Quantized ResNet v2 50 (CpuRef) |
| 220 | - Quantized Yolo v3 (CpuRef) |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 221 | |
| 222 | More machine learning operators will be supported in future releases. |
| 223 | <br/><br/><br/><br/> |
| 224 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 225 | |
| 226 | |
| 227 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 228 | @section S7_tf_parser ArmNN Tensorflow Parser |
| 229 | |
| 230 | `armnnTfParser` is a library for loading neural networks defined by TensorFlow protobuf files into the Arm NN runtime. |
| 231 | |
| 232 | ## TensorFlow operators that the Arm NN SDK supports |
| 233 | |
| 234 | This reference guide provides a list of TensorFlow operators the Arm NN SDK currently supports. |
| 235 | |
| 236 | The Arm NN SDK TensorFlow parser currently only supports fp32 operators. |
| 237 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 238 | ### Fully supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 239 | |
| 240 | - avg_pool |
| 241 | - See the TensorFlow [avg_pool documentation](https://www.tensorflow.org/api_docs/python/tf/nn/avg_pool) for more information. |
| 242 | - bias_add |
| 243 | - See the TensorFlow [bias_add documentation](https://www.tensorflow.org/api_docs/python/tf/nn/bias_add) for more information. |
| 244 | - conv2d |
| 245 | - See the TensorFlow [conv2d documentation](https://www.tensorflow.org/api_docs/python/tf/nn/conv2d) for more information. |
| 246 | - expand_dims |
| 247 | - See the TensorFlow [expand_dims documentation](https://www.tensorflow.org/api_docs/python/tf/expand_dims) for more information. |
| 248 | - gather |
| 249 | - See the TensorFlow [gather documentation](https://www.tensorflow.org/api_docs/python/tf/gather) for more information. |
| 250 | - identity |
| 251 | - See the TensorFlow [identity documentation](https://www.tensorflow.org/api_docs/python/tf/identity) for more information. |
| 252 | - local_response_normalization |
| 253 | - See the TensorFlow [local_response_normalization documentation](https://www.tensorflow.org/api_docs/python/tf/nn/local_response_normalization) for more information. |
| 254 | - max_pool |
| 255 | - See the TensorFlow [max_pool documentation](https://www.tensorflow.org/api_docs/python/tf/nn/max_pool) for more information. |
| 256 | - placeholder |
| 257 | - See the TensorFlow [placeholder documentation](https://www.tensorflow.org/api_docs/python/tf/placeholder) for more information. |
| 258 | - reduce_mean |
Ryan OShea | 2bbfaa7 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 259 | - See the TensorFlow [reduce_mean documentation](https://www.tensorflow.org/api_docs/python/tf/reduce_mean) for more information. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 260 | - relu |
| 261 | - See the TensorFlow [relu documentation](https://www.tensorflow.org/api_docs/python/tf/nn/relu) for more information. |
| 262 | - relu6 |
| 263 | - See the TensorFlow [relu6 documentation](https://www.tensorflow.org/api_docs/python/tf/nn/relu6) for more information. |
| 264 | - rsqrt |
| 265 | - See the TensorFlow [rsqrt documentation](https://www.tensorflow.org/api_docs/python/tf/math/rsqrt) for more information. |
| 266 | - shape |
| 267 | - See the TensorFlow [shape documentation](https://www.tensorflow.org/api_docs/python/tf/shape) for more information. |
| 268 | - sigmoid |
| 269 | - See the TensorFlow [sigmoid documentation](https://www.tensorflow.org/api_docs/python/tf/sigmoid) for more information. |
| 270 | - softplus |
| 271 | - See the TensorFlow [softplus documentation](https://www.tensorflow.org/api_docs/python/tf/nn/softplus) for more information. |
| 272 | - squeeze |
| 273 | - See the TensorFlow [squeeze documentation](https://www.tensorflow.org/api_docs/python/tf/squeeze) for more information. |
| 274 | - tanh |
| 275 | - See the TensorFlow [tanh documentation](https://www.tensorflow.org/api_docs/python/tf/tanh) for more information. |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 276 | - transpose |
| 277 | - See the TensorFlow [transpose documentation](https://www.tensorflow.org/api_docs/python/tf/transpose) for more information. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 278 | |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 279 | ### Partially supported |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 280 | |
| 281 | - add |
| 282 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [add operator documentation](https://www.tensorflow.org/api_docs/python/tf/add) for more information. |
| 283 | - add_n |
| 284 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [add operator documentation](https://www.tensorflow.org/api_docs/python/tf/add_n) for more information. |
| 285 | - concat |
| 286 | - Arm NN supports concatenation along the channel dimension for data formats NHWC and NCHW. |
| 287 | - constant |
| 288 | - The parser does not support the optional `shape` argument. It always infers the shape of the output tensor from `value`. See the TensorFlow [constant documentation](https://www.tensorflow.org/api_docs/python/tf/constant) for further information. |
| 289 | - depthwise_conv2d_native |
| 290 | - The parser only supports a dilation rate of (1,1,1,1). See the TensorFlow [depthwise_conv2d_native documentation](https://www.tensorflow.org/api_docs/python/tf/nn/depthwise_conv2d_native) for more information. |
| 291 | - equal |
| 292 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of 4D and 1D tensors. See the TensorFlow [equal operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/equal) for more information. |
| 293 | - fused_batch_norm |
| 294 | - The parser does not support training outputs. See the TensorFlow [fused_batch_norm documentation](https://www.tensorflow.org/api_docs/python/tf/nn/fused_batch_norm) for more information. |
| 295 | - greater |
| 296 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of 4D and 1D tensors. See the TensorFlow [greater operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/greater) for more information. |
| 297 | - matmul |
| 298 | - The parser only supports constant weights in a fully connected layer. See the TensorFlow [matmul documentation](https://www.tensorflow.org/api_docs/python/tf/matmul) for more information. |
| 299 | - maximum |
| 300 | where maximum is used in one of the following ways |
| 301 | - max(mul(a, x), x) |
| 302 | - max(mul(x, a), x) |
| 303 | - max(x, mul(a, x)) |
| 304 | - max(x, mul(x, a) |
| 305 | This is interpreted as a ActivationLayer with a LeakyRelu activation function. Any other usage of max will result in the insertion of a simple maximum layer. The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting). See the TensorFlow [maximum documentation](https://www.tensorflow.org/api_docs/python/tf/maximum) for more information. |
| 306 | - minimum |
| 307 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of 4D and 1D tensors. See the TensorFlow [minimum operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/minimum) for more information. |
| 308 | - multiply |
| 309 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [multiply documentation](https://www.tensorflow.org/api_docs/python/tf/multiply) for more information. |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 310 | - pack/stack |
| 311 | - See the TensorFlow [stack documentation](https://www.tensorflow.org/api_docs/python/tf/stack) for more information. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 312 | - pad |
| 313 | - Only supports tf.pad function with mode = 'CONSTANT' and constant_values = 0. See the TensorFlow [pad documentation](https://www.tensorflow.org/api_docs/python/tf/pad) for more information. |
| 314 | - realdiv |
| 315 | - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [realdiv documentation](https://www.tensorflow.org/api_docs/python/tf/realdiv) for more information. |
| 316 | - reshape |
| 317 | - The parser does not support reshaping to or from 4D. See the TensorFlow [reshape documentation](https://www.tensorflow.org/api_docs/python/tf/reshape) for more information. |
| 318 | - resize_images |
| 319 | - The parser only supports `ResizeMethod.BILINEAR` with `align_corners=False`. See the TensorFlow [resize_images documentation](https://www.tensorflow.org/api_docs/python/tf/image/resize_images) for more information. |
| 320 | - softmax |
| 321 | - The parser only supports 2D inputs and does not support selecting the `softmax` dimension. See the TensorFlow [softmax documentation](https://www.tensorflow.org/api_docs/python/tf/nn/softmax) for more information. |
| 322 | - split |
| 323 | - Arm NN supports split along the channel dimension for data formats NHWC and NCHW. |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 324 | - strided_slice |
| 325 | - See the TensorFlow [strided_slice documentation](https://www.tensorflow.org/api_docs/python/tf/strided_slice) for more information. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 326 | - subtract |
| 327 | - The parser does not support all forms of broadcasting [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [subtract documentation](https://www.tensorflow.org/api_docs/python/tf/math/subtract) for more information. |
| 328 | |
James Ward | 590f3f7 | 2020-12-02 10:20:48 +0000 | [diff] [blame] | 329 | |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 330 | ## Tested networks |
| 331 | |
| 332 | Arm tests these operators with the following TensorFlow fp32 neural networks: |
| 333 | - Lenet |
| 334 | - mobilenet_v1_1.0_224. The Arm NN SDK only supports the non-quantized version of the network. See the [MobileNet_v1 documentation](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md) for more information on quantized networks. |
| 335 | - inception_v3. The Arm NN SDK only supports the official inception_v3 transformed model. See the TensorFlow documentation on [preparing models for mobile deployment](https://www.tensorflow.org/mobile/prepare_models) for more information on how to transform the inception_v3 network. |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 336 | - Simple MNIST. For more information check out the [tutorial](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/deploying-a-tensorflow-mnist-model-on-arm-nn) on the Arm Developer portal. |
Jan Eilers | 53ca2e5 | 2021-02-02 13:18:09 +0000 | [diff] [blame] | 337 | - ResNet v2 50 implementation from the [TF Slim model zoo](https://github.com/tensorflow/models/tree/master/research/slim) |
Ryan OShea | f3a4323 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 338 | |
| 339 | More machine learning operators will be supported in future releases. |
| 340 | |
| 341 | **/ |
| 342 | } |
Ryan OShea | 2bbfaa7 | 2020-02-12 16:15:27 +0000 | [diff] [blame] | 343 | |