aboutsummaryrefslogtreecommitdiff
path: root/docs/05_01_parsers.dox
blob: a4526e04d5dcc01aba76a6246c6d673b4c398075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved.
///
/// SPDX-License-Identifier: MIT
///

namespace armnn
{
/**
@page parsers Parsers

@tableofcontents
Execute models from different machine learning platforms efficiently with our parsers. Simply choose a parser according
to the model you want to run e.g. If you've got a model in onnx format (<model_name>.onnx) use our onnx-parser.

If you would like to run a Tensorflow Lite (TfLite) model you probably also want to take a look at our @ref delegate.

All parsers are written in C++ but it is also possible to use them in python. For more information on our python
bindings take a look into the @ref md_python_pyarmnn_README section.

<br/><br/>




@section S5_onnx_parser Arm NN Onnx Parser

`armnnOnnxParser` is a library for loading neural networks defined in ONNX protobuf files into the Arm NN runtime.

## ONNX operators that the Arm NN SDK supports

This reference guide provides a list of ONNX operators the Arm NN SDK currently supports.

The Arm NN SDK ONNX parser currently only supports fp32 operators.

### Fully supported

- Add
  - See the ONNX [Add documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Add) for more information

- AveragePool
  - See the ONNX [AveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#AveragePool) for more information.

- Concat
  - See the ONNX [Concat documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Concat) for more information.

- Constant
  - See the ONNX [Constant documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Constant) for more information.

- Clip
  - See the ONNX [Clip documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Clip) for more information.

- Flatten
  - See the ONNX [Flatten documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Flatten) for more information.

- Gather
  - See the ONNX [Gather documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Gather) for more information.

- GlobalAveragePool
  - See the ONNX [GlobalAveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GlobalAveragePool) for more information.

- LeakyRelu
  - See the ONNX [LeakyRelu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LeakyRelu) for more information.

- MaxPool
  - See the ONNX [max_pool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MaxPool) for more information.

- Relu
  - See the ONNX [Relu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Relu) for more information.

- Reshape
  - See the ONNX [Reshape documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Reshape) for more information.

- Shape
  - See the ONNX [Shape documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Shape) for more information.

- Sigmoid
  - See the ONNX [Sigmoid documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Sigmoid) for more information.

- Tanh
  - See the ONNX [Tanh documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Tanh) for more information.

- Unsqueeze
  - See the ONNX [Unsqueeze documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Unsqueeze) for more information.

### Partially supported

- Conv
  - The parser only supports 2D convolutions with a group = 1 or group = #Nb_of_channel (depthwise convolution)
- BatchNormalization
  - 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.
- Gemm
  - The parser only supports constant bias or non-constant bias where bias dimension = 1. See the ONNX [Gemm documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Gemm) for more information.
- MatMul
  - The parser only supports constant weights in a fully connected layer. See the ONNX [MatMul documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MatMul) for more information.

## Tested networks

Arm tested these operators with the following ONNX fp32 neural networks:
- Mobilenet_v2. See the ONNX [MobileNet documentation](https://github.com/onnx/models/tree/master/vision/classification/mobilenet) for more information.
- 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).

More machine learning operators will be supported in future releases.
<br/><br/><br/><br/>




@section S6_tf_lite_parser Arm NN Tf Lite Parser

`armnnTfLiteParser` is a library for loading neural networks defined by TensorFlow Lite FlatBuffers files
into the Arm NN runtime.

## TensorFlow Lite operators that the Arm NN SDK supports

This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports.

### Fully supported
The Arm NN SDK TensorFlow Lite parser currently supports the following operators:

- ABS
- ADD
- ARG_MAX
- ARG_MIN
- AVERAGE_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- BATCH_TO_SPACE
- CONCATENATION, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- CONV_3D, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- DEPTH_TO_SPACE
- DEPTHWISE_CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- DEQUANTIZE
- DIV
- ELU
- EQUAL
- EXP
- EXPAND_DIMS
- FULLY_CONNECTED, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- GATHER
- GREATER
- GREATER_EQUAL
- HARD_SWISH
- LEAKY_RELU
- LESS
- LESS_EQUAL
- LOGICAL_NOT
- LOGISTIC
- L2_NORMALIZATION
- MAX_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE
- MAXIMUM
- MEAN
- MINIMUM
- MIRROR_PAD
- MUL
- NEG
- NOT_EQUAL
- PACK
- PAD
- PADV2
- PRELU
- QUANTIZE
- RELU
- RELU6
- REDUCE_MAX
- REDUCE_MIN
- REDUCE_PROD
- RESHAPE
- RESIZE_BILINEAR
- RESIZE_NEAREST_NEIGHBOR
- RSQRT
- SHAPE
- SLICE
- SOFTMAX
- SPACE_TO_BATCH
- SPLIT
- SPLIT_V
- SQUEEZE
- STRIDED_SLICE
- SUB
- SUM
- TANH
- TRANSPOSE
- TRANSPOSE_CONV
- UNPACK

### Custom Operator
- TFLite_Detection_PostProcess

## Tested networks
Arm tested these operators with the following TensorFlow Lite neural network:
- [Quantized MobileNet](http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224_quant.tgz)
- [Quantized SSD MobileNet](http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18.tar.gz)
- DeepSpeech v1 converted from [TensorFlow model](https://github.com/mozilla/DeepSpeech/releases/tag/v0.4.1)
- DeepSpeaker
- [DeepLab v3+](https://www.tensorflow.org/lite/models/segmentation/overview)
- FSRCNN
- EfficientNet-lite
- RDN converted from [TensorFlow model](https://github.com/hengchuan/RDN-TensorFlow)
- Quantized RDN (CpuRef)
- [Quantized Inception v3](http://download.tensorflow.org/models/tflite_11_05_08/inception_v3_quant.tgz)
- [Quantized Inception v4](http://download.tensorflow.org/models/inception_v4_299_quant_20181026.tgz) (CpuRef)
- Quantized ResNet v2 50 (CpuRef)
- Quantized Yolo v3 (CpuRef)

More machine learning operators will be supported in future releases.

**/
}