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 | /** |
| 27 | @page converter_and_quantizer The ArmNN Converter and Quantizer |
| 28 | @tableofcontents |
| 29 | |
| 30 | @section S10_converter The ArmNN Converter |
| 31 | |
| 32 | The `ArmnnConverter` is a program for converting neural networks from other formats to Arm NN format. |
| 33 | Currently the program supports models in Caffe, Onnx, Tensorflow Protocol Buffers and Tensorflow Lite FlatBuffers formats. Run the program with no arguments to see command-line help. |
| 34 | |
| 35 | For more information about the layers that are supported, see <a href="parsers.xhtml">parsers</a>. |
| 36 | <br/><br/><br/><br/> |
| 37 | |
| 38 | @section S11_quantizer The ArmNN Quantizer |
| 39 | |
| 40 | The `ArmnnQuantizer` is a program for loading a 32-bit float network into ArmNN and converting it into a quantized asymmetric 8-bit or quantized symmetric 16-bit network. |
| 41 | It supports static quantization by default, dynamic quantization is enabled if CSV file of raw input tensors is provided. Run the program with no arguments to see command-line help. |
| 42 | |
| 43 | |
| 44 | |Cmd:||| |
| 45 | | ---|---|---| |
| 46 | | -h | --help | Display help messages | |
| 47 | | -f | --infile | Input file containing float 32 ArmNN Input Graph | |
| 48 | | -s | --scheme | Quantization scheme, "QAsymm8" or "QSymm16". Default value: QAsymm8 | |
| 49 | | -c | --csvfile | CSV file containing paths for raw input tensors for dynamic quantization. If unset, static quantization is used | |
| 50 | | -p | --preserve-data-type | Preserve the input and output data types. If unset, input and output data types are not preserved | |
| 51 | | -d | --outdir | Directory that output file will be written to | |
| 52 | | -o | --outfile | ArmNN output file name | |
| 53 | |
| 54 | <br/> |
| 55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh |
| 56 | ./ArmnnQuantizer -f /path/to/armnn/input/graph/ -s "QSymm16" -c /path/to/csv/file -p 1 -d /path/to/output -o outputFileName |
| 57 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 58 | |
| 59 | **/ |
| 60 | } |