This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
products:sbc:vim3:npu:ksnn:ksnn-convert [2022/09/17 02:46] frank created |
products:sbc:vim3:npu:ksnn:ksnn-convert [2025/01/09 20:33] (current) louis |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Instructions for KSNN conversion tool ====== | ====== Instructions for KSNN conversion tool ====== | ||
- | ===== Introduction | + | Introduction |
- | This document will introduce how to use the KSNN conversion tool. | + | ===== Get the conversion tool ===== |
- | ===== Get convert tool ===== | + | The conversion |
- | + | ||
- | The tool is integrated in the NPU conversion tool warehouse of VIM3. | + | |
```shell | ```shell | ||
- | $ git clone --recursive | + | $ git lfs install |
+ | $ git lfs clone https:// | ||
``` | ``` | ||
The KSNN conversion tool is under '' | The KSNN conversion tool is under '' | ||
Line 19: | Line 18: | ||
``` | ``` | ||
- | ===== Example for Convert | + | ===== Conversion example |
- | Choose tensorflow | + | Choose tensorflow |
- | 1. Get forzen | + | 1. Get the frozen |
```shell | ```shell | ||
$ cd aml_npu_sdk/ | $ cd aml_npu_sdk/ | ||
- | $ wget https:// | + | $ wget https:// |
``` | ``` | ||
Line 33: | Line 32: | ||
```shell | ```shell | ||
- | $ ./convert --model-name | + | # uint8 |
+ | $ ./convert --model-name | ||
> | > | ||
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > | + | > |
- | > | + | > |
> | > | ||
+ | > | ||
+ | > | ||
+ | |||
+ | # int8 | ||
+ | $ ./convert --model-name mobilenet_ssd \ | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | |||
+ | # int16 | ||
+ | $ ./convert --model-name mobilenet_ssd \ | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
> | > | ||
> | > | ||
Line 47: | Line 73: | ||
During conversion, if you need to view detailed information, | During conversion, if you need to view detailed information, | ||
- | 3. File generated after conversion. | + | 3. Model file generated after conversion. |
```shell | ```shell | ||
$ cd aml_npu_sdk/ | $ cd aml_npu_sdk/ | ||
- | $ ls outputs/inception/ | + | $ ls outputs/mobilenet_ssd/ |
- | inception.nb | + | mobilenet_ssd.nb |
``` | ``` | ||