This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim4:npu:demos:vgg16 [2023/09/05 04:52] louis |
products:sbc:vim4:npu:demos:vgg16 [2024/01/04 21:24] (current) louis old revision restored (2023/09/20 01:13) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ~~tag> |
+ | |||
+ | ====== VGG16 TensorFlow Keras VIM4 Demo 4 ====== | ||
+ | |||
+ | {{indexmenu_n> | ||
+ | |||
+ | [[https:// | ||
===== Get Source Code ===== | ===== Get Source Code ===== | ||
+ | |||
+ | [[gh> | ||
+ | |||
```shell | ```shell | ||
- | git clone https:// | + | $ git clone https:// |
``` | ``` | ||
Line 11: | Line 20: | ||
==== Build virtual environment ==== | ==== Build virtual environment ==== | ||
- | Follow Docker official | + | Follow Docker official |
- | Get Docker. | + | Then fetch the prebuilt NPU Docker |
```shell | ```shell | ||
Line 25: | Line 34: | ||
==== Get convert tool ==== | ==== Get convert tool ==== | ||
- | Download Tool from [[gl> | + | Download Tool from [[gl> |
```shell | ```shell | ||
- | $ git clone https:// | + | $ git clone https:// |
``` | ``` | ||
==== Convert ==== | ==== Convert ==== | ||
- | Keras model can convert rknn model directly. But this demo is to convert tensorflow | + | We first need to convert the Keras model('' |
```shell | ```shell | ||
- | git clone https:// | + | $ git clone https:// |
``` | ``` | ||
- | Enter '' | + | Then we need to convert the TensorFlow model to an ADLA model ('' |
+ | |||
+ | Enter '' | ||
- | ```shell convert_adla.sh | + | ```sh convert_adla.sh |
#!/bin/bash | #!/bin/bash | ||
| | ||
Line 67: | Line 78: | ||
``` | ``` | ||
- | Run '' | + | Run '' |
```shell | ```shell | ||
Line 80: | Line 91: | ||
```shell | ```shell | ||
- | $ git clone https:// | + | $ git clone https:// |
``` | ``` | ||
Line 98: | Line 109: | ||
```shell | ```shell | ||
# Compile | # Compile | ||
- | $ cd vim4npu_applications/vgg16 | + | $ cd vim4_npu_applications/vgg16 |
$ mkdir build | $ mkdir build | ||
$ cd build | $ cd build | ||
Line 109: | Line 120: | ||
<WRAP tip > | <WRAP tip > | ||
- | If your **vgg16** model classes | + | If your **VGG16** model classes |
</ | </ | ||