update netrans_py

This commit is contained in:
liangliangou 2024-12-04 09:02:58 +08:00
parent 509ea82f58
commit a125ebfdf8
1 changed files with 17 additions and 17 deletions

View File

@ -241,29 +241,29 @@ netrans_cli 脚本介绍
```
### 3.2 生成Inputmeta文件
在netrans_cli目录下使用inputmeta_gen.sh脚本生成inputmeta文件
- 用法: ./inputmeta_gen.sh 以模型文件名命名的模型数据文件夹,例如:
```shell
在netrans_cli目录下使用inputmeta_gen.sh脚本生成inputmeta文件
- ./inputmeta_gen.sh 以模型文件名命名的模型数据文件夹,例如:
```shell
$ ./inputmeta_gen.sh lenet
... ...
I Namespace(generate='inputmeta', input_meta_output=None, model='lenet.json', separated_database=True, which='generate')
I Load model in lenet.json
I Generate input meta lenet_inputmeta.yml
I ----------------Error(0),Warning(0)----------------
```
```shell
$ ls -lrt lenet
total 3400
-rwxr-xr-x 1 hope hope 1727201 Nov 5 2018 lenet.pb
-rw-r--r-- 1 hope hope 553 Nov 5 2018 0.jpg
-rwxr--r-- 1 hope hope 6 Apr 21 17:04 dataset.txt
-rw-rw-r-- 1 hope hope 69 Jun 7 09:19 inputs_outputs.txt
-rw-r--r-- 1 hope hope 5553 Jun 7 09:21 lenet.json
-rw-r--r-- 1 hope hope 1725178 Jun 7 09:21 lenet.data
-rw-r--r-- 1 hope hope 948 Jun 7 09:35 lenet_inputmeta.yml
I Generate input meta lenet_inputmeta.yml
I ----------------Error(0),Warning(0)----------------
```
可以看到,最终生成的是*.yml文件该文件用于为Netrans中间模型配置输入层数据集合。<b>Netrans中的量化、推理、导出和图片转dat的操作都需要用到这个文件。因此此步骤不可跳过。</b>
可以看到,最终生成的是*.yml文件该文件用于为Netrans中间模型配置输入层数据集合。<b>Netrans中的量化、推理、导出和图片转dat的操作都需要用到这个文件。因此此步骤不可跳过。</b>
```shell
$ ls -lrt lenet
total 3400
-rwxr-xr-x 1 hope hope 1727201 Nov 5 2018 lenet.pb
-rw-r--r-- 1 hope hope 553 Nov 5 2018 0.jpg
-rwxr--r-- 1 hope hope 6 Apr 21 17:04 dataset.txt
-rw-rw-r-- 1 hope hope 69 Jun 7 09:19 inputs_outputs.txt
-rw-r--r-- 1 hope hope 5553 Jun 7 09:21 lenet.json
-rw-r--r-- 1 hope hope 1725178 Jun 7 09:21 lenet.data
-rw-r--r-- 1 hope hope 948 Jun 7 09:35 lenet_inputmeta.yml
```
Inputmeta.yml文件结构如下
```yaml
%YAML 1.2