有两个输入的网络 ,量化时--source-file source.txt 如何设置呢?

目前一个pytorch的pt模型有两个输入 分别是 3 256 256 和 256 6 6 第一步转换已经成功了,但是第二步用以前的命令报错 -ValueError: Input layer “input_of_graph/out1_47” tensor is not set. Vim3 应该是缺少输入 不知道如何在使用 tensorzonex 的时候用两个输入

@liushuan 贴一下你的完整的shell脚本,另外这个从这个提示上来看,像是你的输入节点没有设置对

…/…/khadas/aml_npu_sdk_6.4.0.10/acuity-toolkit/bin/tensorzonex --action quantization --quantized-dtype asymmetric_affine-u8 --channel-mean-value ‘0 0 0 1’ --source text --source-file …/source_template/source.txt --model-input template.json --model-data template.data --quantized-rebuild

可以加你的微信吗?微信上面说 我微信:18781975483

@liushuan 你的数据已经预先归一了么,将完整的log贴出来,我们公司 有规定一般情况下是不允许加微信的

@liushuan 在第一步脚本运行中,你设置了多输入了么

不是归一化的问题,是现在 我的网络有两个 input 第一步我用这个 命令…/…/khadas/aml_npu_sdk_6.4.0.10/acuity-toolkit/bin/convertpytorch --pytorch-model detection.pt --data-output detection.data --net-output detection.json --input-size-list ‘3,287,287#256,6,6’
已经生成了对应 的 data和 json 第二步我执行上面那个脚本就报错了,因为上面那个脚本只设置了一个 source-file 但是网络有两个输入所以会报错

输入输出节点名称 我没有设置,之前我转换网络的时候也没设置过呢。

@liushuan 我这边确认下,稍等,我个人还没 用过多输入的

好的 thanks…

@liushuan

./bin/convertpytorch -h
usage: convertpytorch [-h] --pytorch-model PYTORCH_MODEL [--inputs INPUTS]
                      [--input-size-list INPUT_SIZE_LIST]
                      [--size-with-batch SIZE_WITH_BATCH] [--outputs OUTPUTS]
                      [--net-output NET_OUTPUT] [--data-output DATA_OUTPUT]

pytorch convert tool.

optional arguments:
  -h, --help            show this help message and exit
  --pytorch-model PYTORCH_MODEL
                        pytorch traced model file
  --inputs INPUTS       Model Inputs, default query from model, only support
                        nodes which with one output tensor as input node.
  --input-size-list INPUT_SIZE_LIST
                        Set each input tensor size list, each input size split
                        by #, each size split by ,Each entry in the list
                        should match an entry in '--inputs'
  --size-with-batch SIZE_WITH_BATCH
                        Set each input tensor size if contain batch dim or
                        not, each input batch split by #,
  --outputs OUTPUTS     Model Outputs, default query from model, only support
                        nodes which with one output tensor as output node.
  --net-output NET_OUTPUT
                        Acuity net output file
  --data-output DATA_OUTPUT
                        Acuity net data output file

这个pytroch的转换工具本身是有inputs参数的,你可以按照tensorflow的设置看看?

./bin/convertpytorch 这个命令我已经执行成功了,
./bin/tensorzonex 这个命令我执行的时候失败了。

重点是 现在 source-file 只能配置一个 source.txt 而我有两个输入,另外一个输入没有配置 source.txt

@liushuan 你好,最新的SDK是有一个专门的用来转换多输入模型的章节,你可以按照这个步骤来

这个是哪个版本的文档呢? 6.4.0.10版本的SDK支持吗?

@liushuan 怎么会没有呢

嗯嗯,刚刚找到了,Vim3支持 batch 推理吗?

@liushuan 可以查看一下文档,文档里面写得很详细的,部分文档还有英文

执行这个:aml_npu_sdk_6.4.0.10/acuity-toolkit/bin/pegasus generate inputmeta --model detection.json --separated-database True
报错了。
pegasus: error: unrecognized arguments: --separated-database True