专栏算法工具链hb_compile 模型输入是int64 怎么设置?

hb_compile 模型输入是int64 怎么设置?

已解决
七秒²⁰²² ༄2025-07-07
51
4

1. 芯片型号:J6E

2. 板卡类型:J6E开发板

3. 天工开物开发包 OpenExplorer 版本:v3.0.22

4. 问题定位:模型转换

 

模型输入:name: input.1   tensor: float[1, 3, 512, 960]

                  name: 15          tensor: int64

                  name: 16          tensor: int64

在使用hb_compile 做模型验证时,怎么设置input 是 int64 的  --input-shape 呢?

算法工具链
征程6
评论1
0/1000
  • Huanghui
    Lv.5

    你好,--input-shape的设置官方教程里面有,具体可以参考下这个示例代码:

    2025-07-07
    0
    3
    • 七秒²⁰²² ༄回复Huanghui:

      int64的这个怎么设置呢?是 --input-shape151 吗?

      2025-07-07
      0
    • 七秒²⁰²² ༄回复Huanghui:

      我这样运行后,出现rankof target shape(1) doesnot match the rank of model shape(0)

      2025-07-07
      0
    • Huanghui回复七秒²⁰²² ༄:

      你用 hb_model_info ${model_file} 看一下具体的模型输入细节。按理来说只要 hb_compile --march ${march} \ --proto ${caffe_proto} \ --model ${caffe_model/onnx_model} \ --input-shape input.0 1x1x224x224 --input-shape input.1 1x1x224x224 --input-shape input.2 1x1x224x224这样指定好输入形状就可以了模型回自动生成符合输入要求的数据

      2025-07-07
      0