专栏算法工具链模型转换后仿真infer报错

模型转换后仿真infer报错

已解决
wzyszu1031112021-07-20
161
3
在模型转换03_build.sh中.yaml设置input_type_rt'nv12',成功转换为.bin。执行runtime_sim中03_infer.sh出现如下报错。

+ ./release/bin/example --model_file=../mapper/model_output/feathernetA_rgb_hybrid_horizonrt.bin --model_name=feathernetA_rgb --input_type=image '--input_config_string={"image_list_file":"image_list.txt","width":224,"height":224,"data_type":2}' --output_type=image '--output_config_string={"image_output_dir":"image_out"}' '--post_process_config_string={"score_threshold":0}' --enable_post_process=true

./release/bin/example --model_file=../mapper/model_output/feathernetA_rgb_hybrid_horizonrt.bin --model_name=feathernetA_rgb --input_type=image --input_config_string={"image_list_file":"image_list.txt","width":224,"height":224,"data_type":2} --output_type=image --output_config_string={"image_output_dir":"image_out"} --post_process_config_string={"score_threshold":0} --enable_post_process=true

[2021-07-20 07:07:50 INFO 140630873370496 hr_api.cpp:479] HorizonRT version = 1.3.3

[2021-07-20 07:07:50 INFO 140630873370496 hr_api.cpp:484] hbrt version = 3.10.8

[HBRT] set log level as 0. version = 3.10.8

bpu engine_type is group.

warning: bpu_set_power is ignored in pseudo_firmware

core[0] open!

warning: cnn_core_fc_all_cap is ignored in pseudo_firmware

core[1] open!

[HorizonRT] The model builder version = 1.1.58

[HorizonRT] Hybrid model hbm_hbrt_version = 3.10.8

I0720 07:07:50.533666 1787 simple_example.cc:74] Model info:Input num:1, input[0]: name:input.1, data type:BPU_TYPE_IMG_YUV_NV12, shape:(1,3,224,224,), layout:BPU_LAYOUT_NCHW, aligned shape:(1,4,224,224,), layout:BPU_LAYOUT_NCHW, Output num:1, output[0]: name:530, op:1, data type:BPU_TYPE_TENSOR_F32, shape:(1,2,1,1,), layout:BPU_LAYOUT_NCHW, aligned shape:(1,2,1,1,), layout:BPU_LAYOUT_NCHW

[2021-07-20 07:07:50 ERROR 140630873370496 bpu_task.cc:2054] model of input should be complied with ddr, task uuid: 1626764870535
F0720 07:07:50.535142 1787 simple_example.cc:130] Run model failed:bpu model runtask input source is invalid

*** Check failure stack trace: ***

@ 0x79b2f4 google::LogMessage::Fail()

@ 0x79b250 google::LogMessage::SendToLog()

@ 0x79abce google::LogMessage::Flush()

@ 0x79e0e9 google::LogMessageFatal::~LogMessageFatal()

@ 0x5ca6bf main

@ 0x7fe729d0fb97 __libc_start_main

@ 0x5cf6ca _start

@ (nil) (unknown)

03_infer.sh: line 32: 1787 Aborted (core dumped) ./release/bin/example --model_file=${runtime_model_file} --model_name=${model_name} --input_type=image --input_config_string="{\"image_list_file\":\"image_list.txt\",\"width\":${input_width},\"height\":${input_height},\"data_type\":${input_type}}" --output_type=image --output_config_string={\"image_output_dir\":\"image_out\"} --post_process_config_string={\"score_threshold\":${score_threshold}} --enable_post_process=true

设置.yaml中input_type_rt'nv12' 时它的input_source: {'input.1': 'pyramid'}
input_type_rt'yuv444_128' 时它的input_source: {'input.1': 'ddr'}

请问这pyramid和ddr的区别是什么?我们如果要将模型集成到AI Express中需要怎么设置input_type_rt?

算法工具链
评论1
0/1000
  • Horizon_guosheng
    Lv.1

    input_type_rt 是模型推理时候的输入;

    ddr是占用的内存;

    pyramid 为图像输入模型之前的处理。

    2021-07-21
    0
    2
    • wzyszu103111回复Horizon_guosheng:
      为什么在仿真测试生成的.bin时,在模型转换03_build.sh中.yaml设置input_type_rt'nv12',执行03_infer.sh会出现报错。而.yaml设置input_type_rt'yuv444_128'却能够正常执行03_infer.sh。
      2021-08-16
      0
    • admin回复wzyszu103111:
      2021-08-16
      0