求助:转换后的.bin模型在开发板上部署与原始的.onnx模型出现很大的精度失真问题,逐步验证各个阶段的模型的输出,发现在*_calibrated_model.onnx标定阶段模型发生较大的偏差,后续问题应该怎么去定位?

  1. 模型转换的配置文件
model_parameters:
  # 当前推荐使用 CPU postprocess 导出图:
  #   segmentation_background_lowres : 3 通道,背景头 logits,90x160
  #   segmentation_foreground_lowres : 13 通道,前景头 logits,90x160
  #   depth                          : 1 通道,保持 360x640
  # 其中双头 segmentation 会在本地 / 板端脚本里做 bilinear upsample + merge。
  # 这样可以把 /model/Resize 和 /model/Resize_1 从量化主干里移出去,
  # 优先规避当前最敏感的 segmentation head 上采样量化路径。
  onnx_model: '../lraspp_99_torch110.onnx'
  march: 'bayes-e'
  output_model_file_prefix: 'lraspp_99_torch110_2'
  working_dir: '../hb_mapper_output_2/lraspp_99_torch110_2'
  layer_out_dump: False

  node_info: {"711_Cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "Where_263_cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "Where_263_equal": {'ON': 'BPU','InputType': 'int8','OutputType': 'int8'},
              "Where_263_equal_output_cast": {'ON': 'BPU','InputType': 'int8','OutputType': 'int8'},
              "ScatterND_337": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "Where_340_cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "Where_340_equal": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "Where_340_equal_output_cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "ScatterND_414": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
            }

input_parameters:
  input_name: 'input'

  # 当前最新模型真实输入不是纯 RGB,而是 5 通道 featuremap:
  #   0~2: RGB,已做 (x/255 - mean) / std
  #   3  : radar_range,先按 sensor_depth_max 解码到米制,再按 [depth_min, depth_max]
  #        截断并线性归一化到 [0, 1]
  #   4  : radar_valid_mask,取值 {0, 1}
  # 该输入口径必须与 export_onnx.py、test_and_visualize_onnx.py、
  # test_and_visualize_RDK_X5.py 保持完全一致。
  input_type_train: 'featuremap'
  input_layout_train: 'NCHW'
  input_type_rt: 'featuremap'
  input_layout_rt: 'NCHW'
  input_shape: '1x5x360x640'
  input_batch: 1

  # featuremap 输入要求上板前已经完成全部前处理,因此这里不能再走 rgb/nv12 预处理链
  norm_type: 'no_preprocess'

calibration_parameters:
  # 正式 PTQ 时,这里需要放“预处理后的 5 通道 float32 featuremap 校准数据”
  # 数据口径必须与 input_type_train/input_layout_train/input_shape 完全一致
  # 即每个样本都是 row-major 的 float32 二进制,shape = 1x5x360x640 或 5x360x640
  # 当前 featuremap 生成逻辑应与 02_generate_calibration_data.py 的最新版本一致。
  cal_data_dir: '../hb_calibration_data_f32'
  cal_data_type: 'float32'
  preprocess_on: False
  # per_channel: True
  # 如果已经准备好了代表性的最新 featuremap 校准集,建议保持 default 做正式 PTQ
  # calibration_type: 'default'
  calibration_type: 'skip'

compiler_parameters:
  compile_mode: 'latency'
  debug: True
  core_num: 1
  optimize_level: 'O3'

  # featuremap 输入通常从 DDR 喂入
  input_source: {'input': 'ddr'}
  1. hb_mapper_makertbin.log日志
2026-04-20 11:01:26,668 file: tool_utils.py func: tool_utils line No: 77 log will be stored in /open_explorer/test_lraspp_model_0420/hb_mapper_makertbin.log
2026-04-20 11:01:26,668 file: hb_mapper.py func: hb_mapper line No: 132 Start hb_mapper....
2026-04-20 11:01:26,668 file: hb_mapper.py func: hb_mapper line No: 133 hbdk version 3.49.15
2026-04-20 11:01:26,668 file: hb_mapper.py func: hb_mapper line No: 134 horizon_nn version 1.1.0
2026-04-20 11:01:26,668 file: hb_mapper.py func: hb_mapper line No: 135 hb_mapper version 1.24.3
2026-04-20 11:01:26,668 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 530 Start Model Convert....
2026-04-20 11:01:26,674 file: mapper_conf_parser.py func: mapper_conf_parser line No: 105 validating model_parameters...
2026-04-20 11:01:26,674 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1347 Using abs path /open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx
2026-04-20 11:01:26,674 file: mapper_conf_parser.py func: mapper_conf_parser line No: 260 Using onnx model file: /open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx
2026-04-20 11:01:26,684 file: onnx_parser.py func: onnx_parser line No: 39 Model input names: ['input']
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 264 Model has 1 inputs according to model file
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1347 Using abs path /open_explorer/test_lraspp_model_0420/hb_mapper_output/lraspp_99_torch110
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 287 working_dir does not exist. Creating working_dir: /open_explorer/test_lraspp_model_0420/hb_mapper_output/lraspp_99_torch110
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 438 node_dict: {self.node_dict}
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 119 validating model_parameters finished
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 123 validating input_parameters...
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 135 validating input_parameters finished
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 139 validating calibration_parameters...
2026-04-20 11:01:26,684 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1347 Using abs path /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1013 The calibration dir name suffix is the same as the value float32 of the cal_data_type parameter and will be read with the value of cal_data_type.
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 155 validating calibration_parameters finished
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 159 validating custom_op...
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1076 custom_op does not exist, skipped
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 165 validating custom_op finished
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 168 validating compiler_parameters...
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 183 validating compiler_parameters finished
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 187 validating deprecated parameters...
2026-04-20 11:01:26,685 file: mapper_conf_parser.py func: mapper_conf_parser line No: 193 validating deprecated parameters finished
2026-04-20 11:01:26,685 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 54 Dump config:
2026-04-20 11:01:26,685 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 55 calibration_parameters:
  cal_data_dir: ../hb_calibration_data_f32
  cal_data_type: float32
  calibration_type: default
  preprocess_on: false
compiler_parameters:
  compile_mode: latency
  core_num: 1
  debug: true
  input_source:
    input: ddr
  optimize_level: O3
input_parameters:
  input_batch: '1'
  input_layout_rt: NCHW
  input_layout_train: NCHW
  input_name: input
  input_shape: 1x5x360x640
  input_type_rt: featuremap
  input_type_train: featuremap
  norm_type: no_preprocess
model_parameters:
  layer_out_dump: false
  march: bayes-e
  node_info:
    711_Cast:
      InputType: int16
      'ON': BPU
      OutputType: int16
    ScatterND_337:
      InputType: int16
      'ON': BPU
      OutputType: int16
    ScatterND_414:
      InputType: int16
      'ON': BPU
      OutputType: int16
    Where_263_cast:
      InputType: int16
      'ON': BPU
      OutputType: int16
    Where_263_equal:
      InputType: int8
      'ON': BPU
      OutputType: int8
    Where_263_equal_output_cast:
      InputType: int8
      'ON': BPU
      OutputType: int8
    Where_340_cast:
      InputType: int16
      'ON': BPU
      OutputType: int16
    Where_340_equal:
      InputType: int16
      'ON': BPU
      OutputType: int16
    Where_340_equal_output_cast:
      InputType: int16
      'ON': BPU
      OutputType: int16
  onnx_model: ../lraspp_99_torch110.onnx
  output_model_file_prefix: lraspp_99_torch110
  working_dir: ../hb_mapper_output/lraspp_99_torch110

2026-04-20 11:01:26,689 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 60 input 'input' : original model shape: [1, 5, 360, 640]
2026-04-20 11:01:26,689 file: loader.py func: loader line No: 204 *******************************************
2026-04-20 11:01:26,689 file: loader.py func: loader line No: 205 First calibration picture name: scene_003_27.feature
2026-04-20 11:01:26,689 file: loader.py func: loader line No: 207 First calibration picture md5:
2026-04-20 11:01:26,696 file: loader.py func: loader line No: 211 *******************************************
2026-04-20 11:01:26,697 file: loader.py func: loader line No: 282 created RawImageDirLoader of shape:[1, 5, 360, 640]
2026-04-20 11:01:26,697 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_003_27.feature
2026-04-20 11:01:26,723 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_004_25.feature
2026-04-20 11:01:26,730 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_006_39.feature
2026-04-20 11:01:26,739 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_007_40.feature
2026-04-20 11:01:26,743 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_008_10.feature
2026-04-20 11:01:26,746 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_009_54.feature
2026-04-20 11:01:26,748 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_011_00.feature
2026-04-20 11:01:26,752 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_012_02.feature
2026-04-20 11:01:26,755 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_013_16.feature
2026-04-20 11:01:26,757 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_015_16.feature
2026-04-20 11:01:26,759 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_018_28.feature
2026-04-20 11:01:26,762 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_019_42.feature
2026-04-20 11:01:26,764 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_021_41.feature
2026-04-20 11:01:26,767 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_022_13.feature
2026-04-20 11:01:26,769 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_023_27.feature
2026-04-20 11:01:26,771 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_025_20.feature
2026-04-20 11:01:26,773 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_026_26.feature
2026-04-20 11:01:26,775 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_027_54.feature
2026-04-20 11:01:26,777 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_028_40.feature
2026-04-20 11:01:26,779 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_029_58.feature
2026-04-20 11:01:26,781 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_033_12.feature
2026-04-20 11:01:26,805 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_034_22.feature
2026-04-20 11:01:26,807 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_038_03.feature
2026-04-20 11:01:26,809 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_041_51.feature
2026-04-20 11:01:26,811 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_042_52.feature
2026-04-20 11:01:26,813 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_043_12.feature
2026-04-20 11:01:26,815 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_044_32.feature
2026-04-20 11:01:26,817 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_045_32.feature
2026-04-20 11:01:26,819 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_046_47.feature
2026-04-20 11:01:26,820 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_047_42.feature
2026-04-20 11:01:26,822 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_048_20.feature
2026-04-20 11:01:26,824 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_101_18.feature
2026-04-20 11:01:26,826 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_102_11.feature
2026-04-20 11:01:26,829 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_103_35.feature
2026-04-20 11:01:26,831 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_104_38.feature
2026-04-20 11:01:26,833 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_105_58.feature
2026-04-20 11:01:26,835 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_107_47.feature
2026-04-20 11:01:26,837 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_108_45.feature
2026-04-20 11:01:26,853 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_109_46.feature
2026-04-20 11:01:26,855 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_111_40.feature
2026-04-20 11:01:26,857 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_112_29.feature
2026-04-20 11:01:26,859 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_113_21.feature
2026-04-20 11:01:26,861 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_114_27.feature
2026-04-20 11:01:26,864 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_115_53.feature
2026-04-20 11:01:26,866 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_116_20.feature
2026-04-20 11:01:26,868 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_117_45.feature
2026-04-20 11:01:26,870 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_118_19.feature
2026-04-20 11:01:26,872 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_119_28.feature
2026-04-20 11:01:26,874 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_122_02.feature
2026-04-20 11:01:26,876 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_123_53.feature
2026-04-20 11:01:26,878 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_124_13.feature
2026-04-20 11:01:26,880 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_125_09.feature
2026-04-20 11:01:26,883 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_126_01.feature
2026-04-20 11:01:26,884 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_127_37.feature
2026-04-20 11:01:26,887 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_128_52.feature
2026-04-20 11:01:26,889 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_129_11.feature
2026-04-20 11:01:26,901 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_131_26.feature
2026-04-20 11:01:26,904 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_132_32.feature
2026-04-20 11:01:26,906 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_133_42.feature
2026-04-20 11:01:26,908 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_134_53.feature
2026-04-20 11:01:26,910 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_135_32.feature
2026-04-20 11:01:26,912 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_136_49.feature
2026-04-20 11:01:26,914 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_137_37.feature
2026-04-20 11:01:26,916 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_139_45.feature
2026-04-20 11:01:26,918 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_141_41.feature
2026-04-20 11:01:26,920 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_143_39.feature
2026-04-20 11:01:26,922 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_144_37.feature
2026-04-20 11:01:26,924 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_145_30.feature
2026-04-20 11:01:26,926 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_146_32.feature
2026-04-20 11:01:26,929 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_147_26.feature
2026-04-20 11:01:26,931 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_148_47.feature
2026-04-20 11:01:26,933 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_211_23.feature
2026-04-20 11:01:26,935 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_212_30.feature
2026-04-20 11:01:26,937 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_213_30.feature
2026-04-20 11:01:26,952 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_214_47.feature
2026-04-20 11:01:26,955 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_216_30.feature
2026-04-20 11:01:26,957 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_217_37.feature
2026-04-20 11:01:26,959 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_218_02.feature
2026-04-20 11:01:26,961 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_219_18.feature
2026-04-20 11:01:26,963 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_221_48.feature
2026-04-20 11:01:26,965 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_222_55.feature
2026-04-20 11:01:26,967 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_224_55.feature
2026-04-20 11:01:26,969 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_225_17.feature
2026-04-20 11:01:26,971 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_226_14.feature
2026-04-20 11:01:26,974 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_227_10.feature
2026-04-20 11:01:26,976 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_232_01.feature
2026-04-20 11:01:26,978 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_233_35.feature
2026-04-20 11:01:26,980 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_234_28.feature
2026-04-20 11:01:26,982 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_235_46.feature
2026-04-20 11:01:26,985 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_236_58.feature
2026-04-20 11:01:26,987 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_237_40.feature
2026-04-20 11:01:26,998 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_238_35.feature
2026-04-20 11:01:27,000 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_242_40.feature
2026-04-20 11:01:27,002 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_243_58.feature
2026-04-20 11:01:27,005 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_244_56.feature
2026-04-20 11:01:27,007 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_245_16.feature
2026-04-20 11:01:27,009 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_246_43.feature
2026-04-20 11:01:27,011 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_247_46.feature
2026-04-20 11:01:27,013 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_248_31.feature
2026-04-20 11:01:27,016 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_249_20.feature
2026-04-20 11:01:27,018 file: tool_utils.py func: tool_utils line No: 368 num of calibration data: 100
2026-04-20 11:01:27,018 file: tool_utils.py func: tool_utils line No: 369 calibration data shape: (1, 5, 360, 640)
2026-04-20 11:01:27,066 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 519 call build params:
 {'march': 'bayes-e', 'save_model': True, 'name_prefix': 'lraspp_99_torch110', 'input_dict': {'input': {'input_shape': [1, 5, 360, 640], 'input_batch': 1, 'original_input_layout': 'NCHW'}}, 'hbdk_dict': {'hbdk_pass_through_params': '--O3 --debug --core-num 1 --fast ', 'input-source': {'input': 'ddr', '_default_value': 'ddr'}}, 'node_dict': {'711_Cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_263_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_263_equal': {'ON': 'BPU', 'InputType': 'int8', 'OutputType': 'int8'}, 'Where_263_equal_output_cast': {'ON': 'BPU', 'InputType': 'int8', 'OutputType': 'int8'}, 'ScatterND_337': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_equal': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_equal_output_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'ScatterND_414': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}}, 'check_mode': False}
2026-04-20 11:01:27,077 file: model_builder.py func: model_builder line No: 35 Start to Horizon NN Model Convert.
2026-04-20 11:01:27,093 file: model_debugger.py func: model_debugger line No: 67 Loading horizon_nn debug methods:set()
2026-04-20 11:01:27,094 file: quantization_config.py func: quantization_config line No: 305 The activation calibration parameters:
    calibration_type:     ['max', 'kl']
    max_percentile:       [0.99995, 1.0]
    per_channel:          [True, False]
    asymmetric:           [True, False]
The modelwise search parameters:
    similarity:           0.995
    metric:               cosine-similarity
The input of node 711_Cast are set to : int16
The output of node 711_Cast are set to : int16
The input of node Where_263_cast are set to : int16
The output of node Where_263_cast are set to : int16
The input of node Where_263_equal are set to : int8
The output of node Where_263_equal are set to : int8
The input of node Where_263_equal_output_cast are set to : int8
The output of node Where_263_equal_output_cast are set to : int8
The input of node ScatterND_337 are set to : int16
The output of node ScatterND_337 are set to : int16
The input of node Where_340_cast are set to : int16
The output of node Where_340_cast are set to : int16
The input of node Where_340_equal are set to : int16
The output of node Where_340_equal are set to : int16
The input of node Where_340_equal_output_cast are set to : int16
The output of node Where_340_equal_output_cast are set to : int16
The input of node ScatterND_414 are set to : int16
The output of node ScatterND_414 are set to : int16
There are 9 nodes designated to run on the bpu: ['711_Cast', 'Where_263_cast', 'Where_263_equal', 'Where_263_equal_output_cast', 'ScatterND_337', 'Where_340_cast', 'Where_340_equal', 'Where_340_equal_output_cast', 'ScatterND_414'].
2026-04-20 11:01:27,094 file: model_builder.py func: model_builder line No: 197 The specified model compilation architecture: bayes-e.
2026-04-20 11:01:27,094 file: model_builder.py func: model_builder line No: 207 The specified model compilation optimization parameters: [].
2026-04-20 11:01:27,094 file: model_builder.py func: model_builder line No: 35 Start to prepare the onnx model.
2026-04-20 11:01:27,150 file: prepare.py func: prepare line No: 106 Input ONNX Model Information:
ONNX IR version:          7
Opset version:            ['ai.onnx v11', 'horizon v1']
Producer:                 pytorch v1.10
Domain:                   None
Version:                  None
Graph input:
    input:                shape=[1, 5, 360, 640], dtype=FLOAT32
Graph output:
    ...entation:          shape=['ScatterNDsegmentation_dim_0', 'ScatterNDsegmentation_dim_1', 'ScatterNDsegmentation_dim_2', 'ScatterNDsegmentation_dim_3'], dtype=FLOAT32
    depth:                shape=['Sigmoiddepth_dim_0', 1, 'Sigmoiddepth_dim_2', 'Sigmoiddepth_dim_3'], dtype=FLOAT32
2026-04-20 11:01:27,232 file: model_builder.py func: model_builder line No: 38 End to prepare the onnx model.
2026-04-20 11:01:27,256 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_original_float_model.onnx.
2026-04-20 11:01:27,256 file: model_builder.py func: model_builder line No: 35 Start to optimize the onnx model.
2026-04-20 11:01:28,839 file: constant_folding.py func: constant_folding line No: 66 Summary info for constant_folding:
2026-04-20 11:01:28,839 file: constant_folding.py func: constant_folding line No: 67   After constant_folding, the number of nodes has changed from 415 to 207.
2026-04-20 11:01:28,839 file: constant_folding.py func: constant_folding line No: 71   After constant_folding, the number of parameters has changed from 3407002 to 22299713.
2026-04-20 11:01:28,839 file: constant_folding.py func: constant_folding line No: 76 Detailed info for constant_folding:
2026-04-20 11:01:28,839 file: constant_folding.py func: constant_folding line No: 88   After folding node (op_name: ConstantOfShape_244, op_type: ConstantOfShape), the number of increased parameters is 3455995.
  After folding node (op_name: Expand_380, op_type: Expand), the number of increased parameters is 2995195.
  After folding node (op_name: Expand_388, op_type: Expand), the number of increased parameters is 2995183.
  After folding node (op_name: Expand_396, op_type: Expand), the number of increased parameters is 2994836.
  After folding node (op_name: Expand_404, op_type: Expand), the number of increased parameters is 2994556.
  After folding node (op_name: Add_372, op_type: Add), the number of increased parameters is 2990520.
  After folding node (op_name: Gather_262, op_type: Gather), the number of increased parameters is 691197.
  After folding node (op_name: Expand_303, op_type: Expand), the number of increased parameters is 691195.
  After folding node (op_name: Expand_311, op_type: Expand), the number of increased parameters is 691193.
  After folding node (op_name: Expand_319, op_type: Expand), the number of increased parameters is 690836.
  After folding node (op_name: Expand_327, op_type: Expand), the number of increased parameters is 690556.
  After folding node (op_name: Add_295, op_type: Add), the number of increased parameters is 690120.
  After folding node (op_name: Add_371, op_type: Add), the number of increased parameters is 4667.
  After folding node (op_name: Add_294, op_type: Add), the number of increased parameters is 1077.
  After folding node (op_name: Range_286, op_type: Range), the number of increased parameters is 637.
  After folding node (op_name: Range_363, op_type: Range), the number of increased parameters is 637.
  After folding node (op_name: Range_279, op_type: Range), the number of increased parameters is 357.
  After folding node (op_name: Range_356, op_type: Range), the number of increased parameters is 357.
  After folding node (op_name: Mul_300, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_308, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_316, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_324, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_377, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_385, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_393, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: Mul_401, op_type: Mul), the number of increased parameters is 3.
  After folding node (op_name: ConstantOfShape_298, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_306, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_314, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_322, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_375, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_383, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_391, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: ConstantOfShape_399, op_type: ConstantOfShape), the number of increased parameters is 2.
  After folding node (op_name: Concat_166, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Concat_188, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Concat_201, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Concat_217, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Concat_226, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_240, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_241, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_242, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Concat_243, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Cast_269, op_type: Cast), the number of increased parameters is 0.
  After folding node (op_name: Cast_276, op_type: Cast), the number of increased parameters is 0.
  After folding node (op_name: Cast_283, op_type: Cast), the number of increased parameters is 0.
  After folding node (op_name: Add_293, op_type: Add), the number of increased parameters is 0.
  After folding node (op_name: Cast_346, op_type: Cast), the number of increased parameters is 0.
  After folding node (op_name: Cast_353, op_type: Cast), the number of increased parameters is 0.
  After folding node (op_name: Cast_360, op_type: Cast), the number of increased parameters is 0.
  After folding node (op_name: Add_370, op_type: Add), the number of increased parameters is 0.
  After folding node (op_name: Equal_301, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_304, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Equal_309, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_312, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Equal_317, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_320, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Equal_325, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_328, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Concat_329, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Concat_335, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Equal_378, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_381, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Equal_386, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_389, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Equal_394, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_397, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Equal_402, op_type: Equal), the number of increased parameters is 0.
  After folding node (op_name: Unsqueeze_405, op_type: Unsqueeze), the number of increased parameters is 0.
  After folding node (op_name: Concat_406, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Concat_412, op_type: Concat), the number of increased parameters is 0.
  After folding node (op_name: Range_272, op_type: Range), the number of increased parameters is -2.
  After folding node (op_name: Reshape_291, op_type: Reshape), the number of increased parameters is -2.
  After folding node (op_name: Range_349, op_type: Range), the number of increased parameters is -2.
  After folding node (op_name: Reshape_368, op_type: Reshape), the number of increased parameters is -2.
  After folding node (op_name: Gather_233, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_236, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_239, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_268, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_275, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_282, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Reshape_288, op_type: Reshape), the number of increased parameters is -4.
  After folding node (op_name: Gather_345, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_352, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Gather_359, op_type: Gather), the number of increased parameters is -4.
  After folding node (op_name: Reshape_365, op_type: Reshape), the number of increased parameters is -4.
  After folding node (op_name: Where_302, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_310, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_318, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_326, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_379, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_387, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_395, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Where_403, op_type: Where), the number of increased parameters is -4.
  After folding node (op_name: Slice_165, op_type: Slice), the number of increased parameters is -5.
  After folding node (op_name: Slice_187, op_type: Slice), the number of increased parameters is -5.
  After folding node (op_name: Slice_200, op_type: Slice), the number of increased parameters is -5.
  After folding node (op_name: Slice_216, op_type: Slice), the number of increased parameters is -5.
  After folding node (op_name: Slice_225, op_type: Slice), the number of increased parameters is -5.
  After folding node (op_name: Slice_334, op_type: Slice), the number of increased parameters is -7.
  After folding node (op_name: Slice_411, op_type: Slice), the number of increased parameters is -7.
2026-04-20 11:01:29,269 file: model_builder.py func: model_builder line No: 38 End to optimize the onnx model.
2026-04-20 11:01:29,345 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_optimized_float_model.onnx.
2026-04-20 11:01:29,345 file: model_builder.py func: model_builder line No: 35 Start to calibrate the model.
2026-04-20 11:01:29,630 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_263_cast, type:Cast) does not support data type: int16
2026-04-20 11:01:29,658 file: calibration_data_set.py func: calibration_data_set line No: 111 input name: input,  number_of_samples: 100
2026-04-20 11:01:29,658 file: calibration_data_set.py func: calibration_data_set line No: 123 There are 100 samples in the data set.
2026-04-20 11:01:29,659 file: infer_thresholds.py func: infer_thresholds line No: 84 Run calibration model with modelwise search method.
2026-04-20 11:01:30,323 file: base.py func: base line No: 138 Calibration using batch 8
2026-04-20 11:01:30,374 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_263_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,612 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_263_cast, type:Cast) does not support data type: int16
2026-04-20 11:01:30,613 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_263_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,613 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_263_equal_output_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,613 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_263_equal_output_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,613 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,613 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,614 file: tool_utils.py func: tool_utils line No: 321 The input1 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,614 file: tool_utils.py func: tool_utils line No: 321 The input1 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,614 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,614 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,614 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,615 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,615 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_340_cast, type:Cast) does not support data type: int16
2026-04-20 11:01:30,615 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_340_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,615 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_340_cast, type:Cast) does not support data type: int16
2026-04-20 11:01:30,615 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_340_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,615 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_340_equal, type:Equal) does not support data type: int16
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_340_equal_output_cast, type:Cast) does not support data type: int16
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:Where_340_equal_output_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_340_equal_output_cast, type:Cast) does not support data type: int16
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Where_340_equal_output_cast, type:Cast) does not support data type: int8
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The input0 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,616 file: tool_utils.py func: tool_utils line No: 321 The input1 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The input1 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:ScatterND_414, type:ScatterND) does not support data type: int16
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:ScatterND_414, type:ScatterND) does not support data type: int8
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Resize_220, type:Resize) does not support data type: int16
2026-04-20 11:01:30,617 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Resize_220) is int8, then requantized to int16
2026-04-20 11:01:40,827 file: ort.py func: ort line No: 207 Reset batch_size=1 and execute forward again...
2026-04-20 11:14:31,157 file: base.py func: base line No: 138 Calibration using batch 8
2026-04-20 11:14:33,617 file: ort.py func: ort line No: 207 Reset batch_size=1 and execute forward again...
2026-04-20 11:15:15,521 file: base.py func: base line No: 138 Calibration using batch 8
2026-04-20 11:15:26,593 file: ort.py func: ort line No: 207 Reset batch_size=1 and execute forward again...
2026-04-20 11:27:47,996 file: modelwise_search.py func: modelwise_search line No: 75 Select kl:num_bin=1024,max_num_bin=16384,per_channel method.
2026-04-20 11:27:47,996 file: modelwise_search.py func: modelwise_search line No: 79 Perchannel quantization is enabled.
2026-04-20 11:27:50,199 file: refine_threshold.py func: refine_threshold line No: 39 find illegal threshold in Add_258708_expand_dims_HzCalibration, it will be set default.
2026-04-20 11:27:50,486 file: model_builder.py func: model_builder line No: 38 End to calibrate the model.
2026-04-20 11:27:50,801 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_calibrated_model.onnx.
2026-04-20 11:27:50,801 file: model_builder.py func: model_builder line No: 35 Start to quantize the model.
2026-04-20 11:27:54,932 file: constant_folding.py func: constant_folding line No: 66 Summary info for constant_folding:
2026-04-20 11:27:54,932 file: constant_folding.py func: constant_folding line No: 67   After constant_folding, the number of nodes has changed from 171 to 170.
2026-04-20 11:27:54,932 file: constant_folding.py func: constant_folding line No: 71   After constant_folding, the number of parameters has changed from 22325114 to 22325114.
2026-04-20 11:27:54,932 file: constant_folding.py func: constant_folding line No: 76 Detailed info for constant_folding:
2026-04-20 11:27:54,932 file: constant_folding.py func: constant_folding line No: 88   After folding node (op_name: Where_263_mul_x_NCHW2NHWC_LayoutConvert_Input1, op_type: Transpose), the number of increased parameters is 0.
2026-04-20 11:27:55,169 file: model_builder.py func: model_builder line No: 38 End to quantize the model.
2026-04-20 11:27:55,402 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_quantized_model.onnx.
2026-04-20 11:27:55,403 file: model_builder.py func: model_builder line No: 35 Start to compile the model with march bayes-e.
2026-04-20 11:27:56,719 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_0
2026-04-20 11:27:56,855 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:['--O3', '--debug', '--core-num', '1', '--fast', '--input-layout', 'NHWC', '--output-layout', 'NHWC', '--input-source', 'ddr']
2026-04-20 11:27:56,856 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmp3_txy0ir/torch-jit-export_subgraph_0.hbir -o /tmp/tmp3_txy0ir/torch-jit-export_subgraph_0.hbm --march bayes-e --progressbar --O3 --debug --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr
2026-04-20 11:34:16,587 file: tool_utils.py func: tool_utils line No: 326 consumed time 379.708
2026-04-20 11:34:16,756 file: tool_utils.py func: tool_utils line No: 326 FPS=45.72, latency = 21874.5 us, DDR = 108467584 bytes   (see torch-jit-export_subgraph_0.html)
2026-04-20 11:34:16,782 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_1
2026-04-20 11:34:16,908 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:['--O3', '--debug', '--core-num', '1', '--fast', '--input-layout', 'NHWC', '--output-layout', 'NHWC', '--input-source', 'ddr,ddr']
2026-04-20 11:34:16,909 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmp3_txy0ir/torch-jit-export_subgraph_1.hbir -o /tmp/tmp3_txy0ir/torch-jit-export_subgraph_1.hbm --march bayes-e --progressbar --O3 --debug --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr,ddr
2026-04-20 11:37:45,925 file: tool_utils.py func: tool_utils line No: 326 consumed time 208.991
2026-04-20 11:37:45,978 file: tool_utils.py func: tool_utils line No: 326 FPS=309.21, latency = 3234.0 us, DDR = 7143552 bytes   (see torch-jit-export_subgraph_1.html)
2026-04-20 11:37:45,981 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_2
2026-04-20 11:37:46,054 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:['--O3', '--debug', '--core-num', '1', '--fast', '--input-layout', 'NHWC', '--output-layout', 'NHWC', '--input-source', 'ddr,ddr,ddr']
2026-04-20 11:37:46,054 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmp3_txy0ir/torch-jit-export_subgraph_2.hbir -o /tmp/tmp3_txy0ir/torch-jit-export_subgraph_2.hbm --march bayes-e --progressbar --O3 --debug --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr,ddr,ddr
2026-04-20 11:38:44,611 file: tool_utils.py func: tool_utils line No: 326 consumed time 58.5425
2026-04-20 11:38:44,663 file: tool_utils.py func: tool_utils line No: 326 FPS=89.51, latency = 11172.3 us, DDR = 95157888 bytes   (see torch-jit-export_subgraph_2.html)
2026-04-20 11:38:45,023 file: model_builder.py func: model_builder line No: 38 End to compile the model with march bayes-e.
2026-04-20 11:38:51,561 file: print_info_dict.py func: print_info_dict line No: 72 The main quantized node information:
=================================================================================================================
Node                       ON   Subgraph  Type                           Cosine Similarity  Threshold  DataType  
-----------------------------------------------------------------------------------------------------------------
Conv_0                     BPU  id(0)     HzSQuantizedConv               0.986553           2.2984     int8      
Mul_2                      BPU  id(0)     HzLut                          0.982618           11.5204    int8      
Conv_3                     BPU  id(0)     HzSQuantizedConv               0.990406           6.5663     int8      
Conv_5                     BPU  id(0)     HzSQuantizedConv               0.975953           9.86751    int8      
Conv_7                     BPU  id(0)     HzSQuantizedConv               0.974304           15.3085    int8      
Conv_9                     BPU  id(0)     HzSQuantizedConv               0.959030           7.18763    int8      
Conv_11                    BPU  id(0)     HzSQuantizedConv               0.962719           3.65214    int8      
Conv_12                    BPU  id(0)     HzSQuantizedConv               0.954578           8.41652    int8      
Conv_14                    BPU  id(0)     HzSQuantizedConv               0.943416           7.7668     int8      
Conv_16                    BPU  id(0)     HzSQuantizedConv               0.936729           3.44986    int8      
Conv_18                    BPU  id(0)     HzSQuantizedConv               0.954839           13.0062    int8      
Conv_20                    BPU  id(0)     HzSQuantizedConv               0.944272           3.26714    int8      
GlobalAveragePool_22       BPU  id(0)     HzSQuantizedGlobalAveragePool  0.993927           6.53307    int8      
Conv_23                    BPU  id(0)     HzSQuantizedConv               0.989884           1.28699    int8      
Conv_25                    BPU  id(0)     HzSQuantizedConv               0.991844           2.15651    int8      
HardSigmoid_26             BPU  id(0)     HzLut                          0.999760           3.0        int8      
Mul_27                     BPU  id(0)     HzSElementwiseMul              0.961439           6.53307    int8      
Conv_28                    BPU  id(0)     HzSQuantizedConv               0.955945           5.40161    int8      
Conv_29                    BPU  id(0)     HzSQuantizedConv               0.955329           12.2378    int8      
Conv_31                    BPU  id(0)     HzSQuantizedConv               0.952980           8.71397    int8      
GlobalAveragePool_33       BPU  id(0)     HzSQuantizedGlobalAveragePool  0.997060           6.15624    int8      
Conv_34                    BPU  id(0)     HzSQuantizedConv               0.997949           1.08985    int8      
Conv_36                    BPU  id(0)     HzSQuantizedConv               0.998952           2.13627    int8      
HardSigmoid_37             BPU  id(0)     HzLut                          0.999938           3.0        int8      
Mul_38                     BPU  id(0)     HzSElementwiseMul              0.966128           6.15624    int8      
Conv_39                    BPU  id(0)     HzSQuantizedConv               0.958394           3.84563    int8      
Conv_41                    BPU  id(0)     HzSQuantizedConv               0.962199           14.6263    int8      
Conv_43                    BPU  id(0)     HzSQuantizedConv               0.956062           8.403      int8      
GlobalAveragePool_45       BPU  id(0)     HzSQuantizedGlobalAveragePool  0.997809           7.91869    int8      
Conv_46                    BPU  id(0)     HzSQuantizedConv               0.998193           1.21957    int8      
Conv_48                    BPU  id(0)     HzSQuantizedConv               0.997435           2.13308    int8      
HardSigmoid_49             BPU  id(0)     HzLut                          0.999917           3.0        int8      
Mul_50                     BPU  id(0)     HzSElementwiseMul              0.964402           7.91869    int8      
Conv_51                    BPU  id(0)     HzSQuantizedConv               0.955085           4.12897    int8      
Conv_53                    BPU  id(0)     HzSQuantizedConv               0.961900           17.1155    int8      
Mul_55                     BPU  id(0)     HzLut                          0.963160           7.54118    int8      
Conv_56                    BPU  id(0)     HzSQuantizedConv               0.963110           6.7844     int8      
Mul_58                     BPU  id(0)     HzLut                          0.961440           7.92997    int8      
Conv_59                    BPU  id(0)     HzSQuantizedConv               0.965863           7.92997    int8      
Conv_60                    BPU  id(0)     HzSQuantizedConv               0.964805           7.97945    int8      
Mul_62                     BPU  id(0)     HzLut                          0.964762           7.46734    int8      
Conv_63                    BPU  id(0)     HzSQuantizedConv               0.964398           4.97091    int8      
Mul_65                     BPU  id(0)     HzLut                          0.961959           8.2789     int8      
Conv_66                    BPU  id(0)     HzSQuantizedConv               0.963424           12.2686    int8      
Conv_68                    BPU  id(0)     HzSQuantizedConv               0.967719           12.6338    int8      
Mul_70                     BPU  id(0)     HzLut                          0.967525           7.89655    int8      
Conv_71                    BPU  id(0)     HzSQuantizedConv               0.967249           6.31167    int8      
Mul_73                     BPU  id(0)     HzLut                          0.964578           9.28673    int8      
Conv_74                    BPU  id(0)     HzSQuantizedConv               0.963028           10.58      int8      
Conv_76                    BPU  id(0)     HzSQuantizedConv               0.967019           15.7999    int8      
Mul_78                     BPU  id(0)     HzLut                          0.966378           7.42885    int8      
Conv_79                    BPU  id(0)     HzSQuantizedConv               0.962902           5.51167    int8      
Mul_81                     BPU  id(0)     HzLut                          0.963757           8.57854    int8      
Conv_82                    BPU  id(0)     HzSQuantizedConv               0.962496           8.87346    int8      
Conv_84                    BPU  id(0)     HzSQuantizedConv               0.971099           17.831     int8      
Mul_86                     BPU  id(0)     HzLut                          0.971189           7.96112    int8      
Conv_87                    BPU  id(0)     HzSQuantizedConv               0.976725           6.11321    int8      
Mul_89                     BPU  id(0)     HzLut                          0.974693           8.07926    int8      
GlobalAveragePool_90       BPU  id(0)     HzSQuantizedGlobalAveragePool  0.991565           7.0649     int8      
Conv_91                    BPU  id(0)     HzSQuantizedConv               0.993154           0.734618   int8      
Conv_93                    BPU  id(0)     HzSQuantizedConv               0.992650           1.31863    int8      
HardSigmoid_94             BPU  id(0)     HzLut                          0.999965           3.0        int8      
Mul_95                     BPU  id(0)     HzSElementwiseMul              0.974305           7.0649     int8      
Conv_96                    BPU  id(0)     HzSQuantizedConv               0.979867           2.72911    int8      
Conv_97                    BPU  id(0)     HzSQuantizedConv               0.977957           8.07667    int8      
Mul_99                     BPU  id(0)     HzLut                          0.977158           7.25696    int8      
Conv_100                   BPU  id(0)     HzSQuantizedConv               0.977867           4.82849    int8      
Mul_102                    BPU  id(0)     HzLut                          0.976410           7.5785     int8      
GlobalAveragePool_103      BPU  id(0)     HzSQuantizedGlobalAveragePool  0.990754           5.29187    int8      
Conv_104                   BPU  id(0)     HzSQuantizedConv               0.990275           0.762569   int8      
Conv_106                   BPU  id(0)     HzSQuantizedConv               0.991036           1.22081    int8      
HardSigmoid_107            BPU  id(0)     HzLut                          0.999961           3.0        int8      
Mul_108                    BPU  id(0)     HzSElementwiseMul              0.976040           5.29187    int8      
Conv_109                   BPU  id(0)     HzSQuantizedConv               0.977550           2.74255    int8      
Conv_111                   BPU  id(0)     HzSQuantizedConv               0.981876           12.1219    int8      
Mul_113                    BPU  id(0)     HzLut                          0.980931           7.41744    int8      
Conv_114                   BPU  id(0)     HzSQuantizedConv               0.984248           4.31776    int8      
Mul_116                    BPU  id(0)     HzLut                          0.981323           7.01304    int8      
GlobalAveragePool_117      BPU  id(0)     HzSQuantizedGlobalAveragePool  0.991503           5.53688    int8      
Conv_118                   BPU  id(0)     HzSQuantizedConv               0.991524           0.828109   int8      
Conv_120                   BPU  id(0)     HzSQuantizedConv               0.991458           1.37029    int8      
HardSigmoid_121            BPU  id(0)     HzLut                          0.999946           3.0        int8      
Mul_122                    BPU  id(0)     HzSElementwiseMul              0.980876           5.53688    int8      
Conv_123                   BPU  id(0)     HzSQuantizedConv               0.984918           2.10283    int8      
Conv_124                   BPU  id(0)     HzSQuantizedConv               0.981502           5.73947    int8      
Mul_126                    BPU  id(0)     HzLut                          0.978127           5.48624    int8      
Conv_127                   BPU  id(0)     HzSQuantizedConv               0.979374           3.65032    int8      
Mul_129                    BPU  id(0)     HzLut                          0.976635           6.23468    int8      
GlobalAveragePool_130      BPU  id(0)     HzSQuantizedGlobalAveragePool  0.986216           3.55395    int8      
Conv_131                   BPU  id(0)     HzSQuantizedConv               0.987970           0.924026   int8      
Conv_133                   BPU  id(0)     HzSQuantizedConv               0.989800           1.68722    int8      
HardSigmoid_134            BPU  id(0)     HzLut                          0.999947           3.0        int8      
Mul_135                    BPU  id(0)     HzSElementwiseMul              0.976136           3.55395    int8      
Conv_136                   BPU  id(0)     HzSQuantizedConv               0.973035           2.15599    int8      
Conv_138                   BPU  id(0)     HzSQuantizedConv               0.976796           7.28022    int8      
Mul_140                    BPU  id(0)     HzLut                          0.973830           5.3063     int8      
Conv_141                   BPU  id(0)     HzSQuantizedConv               0.974648           5.02232    int8      
Mul_143                    BPU  id(0)     HzLut                          0.970819           6.50338    int8      
GlobalAveragePool_144      BPU  id(0)     HzSQuantizedGlobalAveragePool  0.982516           4.87036    int8      
Conv_145                   BPU  id(0)     HzSQuantizedConv               0.982393           0.929957   int8      
Conv_147                   BPU  id(0)     HzSQuantizedConv               0.983388           1.45901    int8      
HardSigmoid_148            BPU  id(0)     HzLut                          0.999915           3.0        int8      
Mul_149                    BPU  id(0)     HzSElementwiseMul              0.970485           4.87036    int8      
Conv_150                   BPU  id(0)     HzSQuantizedConv               0.957496           2.01668    int8      
Conv_152                   BPU  id(0)     HzSQuantizedConv               0.972063           9.2505     int8      
Mul_154                    BPU  id(0)     HzLut                          0.968816           5.78079    int8      
Conv_155                   BPU  id(0)     HzSQuantizedConv               0.974796           4.99076    int8      
GlobalAveragePool_157      BPU  id(0)     HzSQuantizedGlobalAveragePool  0.985728           4.99076    int8      
Conv_158                   BPU  id(0)     HzSQuantizedConv               0.999670           1.31951    int8      
Sigmoid_159                BPU  id(0)     HzLut                          0.999970           5.49897    int8      
Mul_160                    BPU  id(0)     HzSElementwiseMul              0.979894           9.05157    int8      
Resize_169                 BPU  id(0)     HzQuantizedRoiResize           0.983667           4.1394     int8      
Conv_170                   BPU  id(0)     HzSQuantizedConv               0.947539           8.41652    int8      
Conv_171                   BPU  id(0)     HzSQuantizedConv               0.991001           4.1394     int8      
Conv_173                   BPU  id(0)     HzSQuantizedConv               0.959445           8.41652    int8      
Conv_174                   BPU  id(0)     HzSQuantizedConv               0.992755           4.1394     int8      
Conv_176                   BPU  id(0)     HzSQuantizedConv               0.968049           8.41652    int8      
598_calibrated_Requantize  BPU  id(0)     HzRequantize                   --                 --         int8      
Concat_178                 BPU  id(0)     Concat                         0.979130           4.91939    int8      
Conv_179                   BPU  id(0)     HzSQuantizedConv               0.987551           4.91939    int8      
Conv_181                   BPU  id(0)     HzSQuantizedConv               0.985538           4.76962    int8      
Resize_191                 BPU  id(0)     HzQuantizedRoiResize           0.986748           4.16733    int8      
Conv_192                   BPU  id(0)     HzSQuantizedConv               0.986265           4.16733    int8      
Conv_194                   BPU  id(0)     HzSQuantizedConv               0.982295           4.43785    int8      
Resize_204                 BPU  id(0)     HzQuantizedRoiResize           0.982469           3.70782    int8      
Conv_205                   BPU  id(0)     HzSQuantizedConv               0.989918           3.70782    int8      
Conv_207                   BPU  id(0)     HzSQuantizedConv               0.982151           3.46615    int8      
Conv_209                   BPU  id(0)     HzSQuantizedConv               0.976264           4.16097    int8      
Conv_211                   BPU  id(0)     HzSQuantizedConv               0.990917           4.28882    int8      
601_calibrated_Requantize  BPU  id(0)     HzRequantize                   --                 --         int16     
Resize_220                 BPU  id(0)     HzQuantizedRoiResize           0.990003           21.1521    int8      
Resize_229                 BPU  id(0)     HzQuantizedRoiResize           0.990926           32.0381    int8      
Sigmoid_230                BPU  id(0)     HzLut2Layer                    0.999924           11.0903    int16     
665_Requantize             BPU  id(0)     HzRequantize                   --                 --         int8      
Slice_249                  BPU  id(0)     Slice                          0.993033           21.1521    int16     
ReduceMax_250              BPU  id(0)     HzQuantizedReduceMax           0.989577           21.1521    int16     
Slice_255                  BPU  id(0)     Slice                          0.983892           32.0381    int8      
ReduceMax_256              BPU  id(0)     HzQuantizedReduceMax           0.991725           32.0381    int8      
Add_258                    BPU  id(0)     HzSElementwiseAdd              0.991727           32.0381    int8      
Less_259                   BPU  id(0)     HzQuantizedComparison          0.969624           27.1529    int16     
711_Cast                   CPU  --        Cast                           --                 --         float     
Where_263_cast             CPU  --        Cast                           0.982837           --         bool      
Where_263_mul_x            BPU  id(1)     HzSElementwiseMul              0.982776           127.0      int8      
Where_263_equal            BPU  id(1)     HzQuantizedComparison          0.969624           127.0      int8      
Where_263_mul_y            BPU  id(1)     HzSElementwiseMul              0.980290           127.0      int16     
Where_263_add              BPU  id(1)     HzSElementwiseAdd              0.982844           9916.99    int8      
ScatterND_337              CPU  --        ScatterND                      0.997499           --         float     
Gather_339                 BPU  id(2)     Gather                         0.999230           1254.88    int8      
Where_340_cast             CPU  --        Cast                           0.982837           --         bool      
Where_340_mul_x            BPU  id(2)     HzSElementwiseMul              0.968856           32767.0    int16     
Where_340_equal            BPU  id(2)     HzQuantizedComparison          0.969624           32767.0    int16     
Where_340_mul_y            BPU  id(2)     HzSElementwiseMul              0.969471           127.0      int8      
Where_340_add              BPU  id(2)     HzSElementwiseAdd              0.969493           23.9788    int8      
ScatterND_414              CPU  --        ScatterND                      0.972476           --         float
2026-04-20 11:38:51,562 file: print_info_dict.py func: print_info_dict line No: 72 The quantized model output:
===============================================================================
Output        Cosine Similarity  L1 Distance  L2 Distance  Chebyshev Distance  
-------------------------------------------------------------------------------
segmentation  0.972476           3329.117630  2.905576     10007.533203        
depth         0.999924           0.003654     0.000019     0.140367
2026-04-20 11:38:51,570 file: model_builder.py func: model_builder line No: 38 End to Horizon NN Model Convert.
2026-04-20 11:38:51,659 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 601 start convert to *.bin file....
2026-04-20 11:38:51,675 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4326 ONNX model output num : 2
2026-04-20 11:38:54,229 file: layout_util.py func: layout_util line No: 15 set_featuremap_layout start
2026-04-20 11:38:54,229 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4060 model_deps_info: {'hb_mapper_version': '1.24.3', 'hbdk_version': '3.49.15', 'hbdk_runtime_version': ' 3.15.55.0', 'horizon_nn_version': '1.1.0', 'onnx_model': '/open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx', 'march': 'bayes-e', 'layer_out_dump': False, 'log_level': 'DEBUG', 'working_dir': '/open_explorer/test_lraspp_model_0420/hb_mapper_output/lraspp_99_torch110', 'model_prefix': 'lraspp_99_torch110', 'node_info': {'711_Cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_263_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_263_equal': {'ON': 'BPU', 'InputType': 'int8', 'OutputType': 'int8'}, 'Where_263_equal_output_cast': {'ON': 'BPU', 'InputType': 'int8', 'OutputType': 'int8'}, 'ScatterND_337': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_equal': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_equal_output_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'ScatterND_414': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}}, 'input_names': ['input'], 'input_type_rt': ['featuremap'], 'input_space_and_range': ['regular'], 'input_type_train': ['featuremap'], 'input_layout_rt': ['NCHW'], 'input_layout_train': ['NCHW'], 'norm_type': ['no_preprocess'], 'scale_value': [''], 'mean_value': [''], 'input_shape': ['1x5x360x640'], 'input_batch': ['1'], 'cal_dir': ['/open_explorer/test_lraspp_model_0420/hb_calibration_data_f32'], 'cal_data_type': ['float32'], 'preprocess_on': False, 'calibration_type': 'default', 'per_channel': 'False', 'hbdk_params': {'hbdk_pass_through_params': '--O3 --debug --core-num 1 --fast ', 'input-source': {'input': 'ddr', '_default_value': 'ddr'}}, 'debug': True, 'compile_mode': 'latency'}
2026-04-20 11:38:54,229 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4183 ############# model deps info #############
2026-04-20 11:38:54,229 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4184 hb_mapper version   : 1.24.3
2026-04-20 11:38:54,229 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4187 hbdk version        : 3.49.15
2026-04-20 11:38:54,229 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4189 hbdk runtime version: 3.15.55.0
2026-04-20 11:38:54,229 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4192 horizon_nn version  : 1.1.0
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4196 ############# model_parameters info #############
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4202 onnx_model          : /open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4203 BPU march           : bayes-e
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4204 layer_out_dump      : False
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4205 log_level           : DEBUG
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4206 working dir         : /open_explorer/test_lraspp_model_0420/hb_mapper_output/lraspp_99_torch110
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4207 output_model_file_prefix: lraspp_99_torch110
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4226 node info  : {'711_Cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_263_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_263_equal': {'ON': 'BPU', 'InputType': 'int8', 'OutputType': 'int8'}, 'Where_263_equal_output_cast': {'ON': 'BPU', 'InputType': 'int8', 'OutputType': 'int8'}, 'ScatterND_337': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_equal': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'Where_340_equal_output_cast': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}, 'ScatterND_414': {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}}
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4228 ############# input_parameters info #############
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4246 ------------------------------------------
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4248 ---------input info : input ---------
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4249 input_name          : input
2026-04-20 11:38:54,230 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4250 input_type_rt       : featuremap
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4252 input_space&range   : regular
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4254 input_layout_rt     : NCHW
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4255 input_type_train    : featuremap
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4256 input_layout_train  : NCHW
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4257 norm_type           : no_preprocess
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4258 input_shape         : 1x5x360x640
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4260 input_batch         : 1
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4268 cal_data_dir        : /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4270 cal_data_type       : float32
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4271 ---------input info : input end -------
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4272 ------------------------------------------
2026-04-20 11:38:54,231 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4274 ############# calibration_parameters info #############
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4275 preprocess_on       : False
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4276 calibration_type:   : default
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4284 per_channel         : False
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4303 ############# compiler_parameters info #############
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4305 debug               : True
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4307 compile_mode        : latency
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4310 hbdk_pass_through_params: --O3 --debug --core-num 1 --fast
2026-04-20 11:38:54,232 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4310 input-source        : {'input': 'ddr', '_default_value': 'ddr'}
2026-04-20 11:38:54,657 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 783 Convert to runtime bin file successfully!
2026-04-20 11:38:54,658 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 784 End Model Convert

根据排查手册,目前已做的排查:1. 对比各个中间模型的原始输出矩阵,发现在*_calibrated_model.onnx已产生较大的输出矩阵偏差,希望能提供一下帮助。

1 个赞

我来帮你分析这个模型转换精度失真问题。先搜索一下社区中类似的标定精度问题案例。

问题分析与定位建议

根据你的日志和描述,问题核心在于 标定阶段(calibration)产生了较大精度损失。从日志中可以看到几个关键信息:

关键问题点

  1. 标定配置矛盾:

    • 配置文件中设置 calibration_type: skip(跳过标定)
    • 但日志显示实际执行了 calibration_type: default
    • 这导致标定过程使用了默认参数,可能与你的模型不匹配
  2. 余弦相似度偏低:

    • 多个卷积层余弦相似度在 0.93-0.96 之间(偏低)
    • 最终 segmentation 输出余弦相似度仅 0.972476
    • depth 输出较好(0.999924)
  3. 数据类型不支持警告:

    • 日志中大量出现 does not support data type: int16/int8 警告
    • 涉及 Where_263_cast、ScatterND_337 等节点

排查步骤

步骤 1:修正标定配置

calibration_parameters:
  cal_data_dir: '../hb_calibration_data_f32'
  cal_data_type: 'float32'
  preprocess_on: False
  calibration_type: 'max'  # 改为 max 尝试
  max_percentile: [0.9999, 1.0]  # 调整分位值
  per_channel: True  # 开启 per_channel 量化

说明:

  • calibration_type: 'max' 通常比 default(KL 散度)更稳定
  • per_channel: True 可显著提升卷积层精度

步骤 2:针对低相似度算子强制 CPU 运行

从日志中筛选余弦相似度 < 0.95 的节点,在 node_info 中强制 CPU 运行:

model_parameters:
  node_info:
    # 原有配置保持不变
    "711_Cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'}
    # ...
    
    # 新增:将低相似度算子强制 CPU 运行
    "Conv_16": {'ON': 'CPU'}  # 0.936729
    "Conv_14": {'ON': 'CPU'}  # 0.943416
    "Conv_12": {'ON': 'CPU'}  # 0.954578
    "Conv_9": {'ON': 'CPU'}   # 0.959030

步骤 3:验证标定数据质量

检查校准数据是否符合要求:

# 1. 检查校准数据数量和形状
python3 -c "
import numpy as np
import os

cal_dir = '../hb_calibration_data_f32'
files = [f for f in os.listdir(cal_dir) if f.endswith('.feature')]
print(f'校准文件数量:{len(files)}')

# 检查第一个文件
first_file = os.path.join(cal_dir, files[0])
data = np.fromfile(first_file, dtype=np.float32).reshape(1, 5, 360, 640)
print(f'数据形状:{data.shape}')
print(f'数据范围:[{data.min()}, {data.max()}]')
print(f'数据均值:{data.mean()}')
"

预期:

  • 校准数据建议 ≥ 100 张(你目前是 100 张,符合)
  • 数据范围应与训练时预处理后的分布一致
  • 确保 5 通道 featuremap 的生成逻辑与训练时完全一致

步骤 4:分层验证标定前后差异

使用以下脚本对比 original_float_model.onnx 和 calibrated_model.onnx 的输出:

import onnxruntime as ort
import numpy as np

# 加载测试数据
test_data = np.fromfile('test_sample.feature', dtype=np.float32).reshape(1, 5, 360, 640)

# 原始浮点模型
sess_orig = ort.InferenceSession('lraspp_99_torch110_original_float_model.onnx')
output_orig = sess_orig.run(None, {'input': test_data})

# 标定后模型
sess_cal = ort.InferenceSession('lraspp_99_torch110_calibrated_model.onnx')
output_cal = sess_cal.run(None, {'input': test_data})

# 计算余弦相似度
def cosine_sim(a, b):
    a_flat = a.flatten()
    b_flat = b.flatten()
    return np.dot(a_flat, b_flat) / (np.linalg.norm(a_flat) * np.linalg.norm(b_flat))

for i, (o1, o2) in enumerate(zip(output_orig, output_cal)):
    sim = cosine_sim(o1, o2)
    print(f'Output {i} cosine similarity: {sim:.6f}')

步骤 5:尝试 Int16 量化策略

如果上述方法仍无法解决,参考社区精华帖 PTQ精度调优手段—设置Int16量化,对敏感层强制 Int16:

model_parameters:
  node_info:
    # 对 segmentation head 相关层强制 int16
    "Conv_170": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}
    "Conv_171": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}
    "Conv_173": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}
    "Conv_174": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}
    "Conv_176": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}

推荐优先级

  1. 先修正 calibration_type 和 per_channel(步骤 1)
  2. 验证校准数据质量(步骤 3)
  3. 对低相似度算子强制 CPU(步骤 2)
  4. 尝试 Int16 量化策略(步骤 5)

社区资源参考

建议按上述步骤逐一尝试,每步完成后重新运行 hb_mapper_makertbin 并对比 *_calibrated_model.onnx 的输出精度。如果问题仍未解决,可提供标定前后的具体余弦相似度数值,进一步分析。

你好,需要参考手册配置校准数据集。

您的意思是,大概率问题处在校准数据集上?这个目前也是我怀疑的最大地方。我问个问题,校验数据集是不是保证与输入的训练数据集一致就可以?对于featuremap输入来说,我没有找到对应的案例,所以不是很熟悉

是的,Marcelo6151 管理员的意思就是问题极大概率在校准数据集上。你的理解基本正确,但对于 featuremap 输入,需要更精确的要求:

核心结论

校准数据 ≠ 原始训练数据,而是预处理后的 featuremap,必须满足:

校准数据的生成逻辑 = 训练时的预处理逻辑 = 板端推理前的预处理逻辑

三者必须完全一致,任何一个参数偏差都会导致标定阶段精度崩塌。


你的 5 通道 featuremap 关键检查点

根据你配置文件中的注释,校准数据生成必须严格遵循:

通道 内容 预处理要求 常见坑点
0-2 RGB (x/255 - mean) / std mean/std 值必须与训练时完全一致(如 [0.485, 0.456, 0.406] 和 [0.229, 0.224, 0.225])
3 radar_range ① 按 sensor_depth_max 解码到米制
② 按 [depth_min, depth_max] 截断
③ 线性归一化到 [0, 1]
三个参数必须与训练时一致
4 radar_valid_mask 取值 {0, 1} 生成逻辑(如阈值判断)必须一致

排查步骤

步骤 1:验证校准数据分布

python3 -c "
import numpy as np
import os

cal_dir = '../hb_calibration_data_f32'
files = sorted([f for f in os.listdir(cal_dir) if f.endswith('.feature')])

print(f'校准文件数量:{len(files)}')

# 检查多个样本的统计信息
rgb_means, rgb_stds = [], []
depth_means, depth_stds = [], []
mask_ratios = []

for f in files[:10]:  # 抽查前 10 个
    data = np.fromfile(os.path.join(cal_dir, f), dtype=np.float32).reshape(5, 360, 640)
    
    # RGB 通道 (0-2)
    rgb = data[:3]
    rgb_means.append(rgb.mean())
    rgb_stds.append(rgb.std())
    
    # Depth 通道 (3)
    depth = data[3]
    depth_means.append(depth.mean())
    depth_stds.append(depth.std())
    
    # Mask 通道 (4)
    mask = data[4]
    mask_ratios.append((mask > 0.5).sum() / mask.size)

print(f'RGB 通道均值范围:[{min(rgb_means):.4f}, {max(rgb_means):.4f}]')
print(f'RGB 通道标准差范围:[{min(rgb_stds):.4f}, {max(rgb_stds):.4f}]')
print(f'Depth 通道均值范围:[{min(depth_means):.4f}, {max(depth_means):.4f}]')
print(f'Depth 通道标准差范围:[{min(depth_stds):.4f}, {max(depth_stds):.4f}]')
print(f'Mask 有效点比例范围:[{min(mask_ratios):.4f}, {max(mask_ratios):.4f}]')

# 预期检查
# RGB 归一化后通常均值接近 0,标准差接近 1
# Depth 归一化到 [0,1] 后均值通常在 0.1-0.5 之间
# Mask 有效点比例根据场景而定
"

步骤 2:对比训练数据预处理逻辑

找到你训练时的数据生成脚本(如 02_generate_calibration_data.py),逐项核对:

# 训练时预处理伪代码示例(你需要找到自己的实际代码)
def generate_featuremap(rgb_image, radar_data):
    # 通道 0-2: RGB 归一化
    mean = [0.485, 0.456, 0.406]  # ← 必须与校准时一致
    std = [0.229, 0.224, 0.225]   # ← 必须与校准时一致
    rgb_normalized = (rgb_image / 255.0 - mean) / std
    
    # 通道 3: radar_range 解码 + 归一化
    sensor_depth_max = 255.0      # ← 必须与校准时一致
    depth_min = 0.0               # ← 必须与校准时一致
    depth_max = 80.0              # ← 必须与校准时一致
    
    depth_meters = radar_data / sensor_depth_max
    depth_clipped = np.clip(depth_meters, depth_min, depth_max)
    depth_normalized = (depth_clipped - depth_min) / (depth_max - depth_min)
    
    # 通道 4: valid_mask
    valid_mask = (radar_data > 0).astype(np.float32)
    
    # 堆叠为 5 通道
    featuremap = np.concatenate([rgb_normalized, depth_normalized[None], valid_mask[None]], axis=0)
    return featuremap

关键问题:你的校准数据生成脚本中,上述参数是否与训练时完全一致?


步骤 3:单样本对比验证

选取同一场景的原始数据,分别用训练预处理脚本和校准数据生成脚本处理,对比输出:

import numpy as np

# 加载训练时生成的 featuremap(如果有保存)
train_featuremap = np.fromfile('train_sample.feature', dtype=np.float32).reshape(5, 360, 640)

# 加载校准时生成的 featuremap
cal_featuremap = np.fromfile('../hb_calibration_data_f32/scene_003_27.feature', dtype=np.float32).reshape(5, 360, 640)

# 逐通道对比
for i in range(5):
    diff = np.abs(train_featuremap[i] - cal_featuremap[i])
    print(f'通道 {i}: 最大差异 = {diff.max():.6f}, 平均差异 = {diff.mean():.6f}')
    if diff.max() > 1e-4:
        print(f'  ⚠️  通道 {i} 存在显著差异!')

如果任何通道的最大差异 > 1e-4,说明预处理逻辑不一致。


步骤 4:检查校准数据文件格式

# 检查单个文件大小是否正确
# 1x5x360x640 float32 = 1*5*360*640*4 = 4,608,000 字节
ls -lh ../hb_calibration_data_f32/scene_003_27.feature

# 应该显示约 4.4M

常见问题汇总

问题 现象 解决方案
RGB mean/std 不一致 校准数据分布偏移 核对训练配置中的归一化参数
depth 归一化参数错误 depth 通道值域超出 [0,1] 或分布异常 检查 sensor_depth_max, depth_min, depth_max
通道顺序错误 模型输入错位 确认堆叠顺序是 [RGB, depth, mask]
数据布局错误 NCHW vs NHWC 混淆 确认是 5x360x640 (CHW) 而非 360x640x5 (HWC)
校准样本代表性不足 标定阈值估计偏差 增加校准样本多样性(不同光照、距离场景)

下一步行动

  1. 立即执行步骤 1,检查校准数据统计分布是否合理
  2. 找到训练预处理代码,逐项核对参数
  3. 如果确认校准数据有问题,重新生成校准数据集后,修改配置:
calibration_parameters:
  cal_data_dir: '../hb_calibration_data_f32'  # 新生成的数据
  cal_data_type: 'float32'
  preprocess_on: False
  calibration_type: 'max'  # 建议先试 max
  per_channel: True        # 开启 per_channel
  1. 重新运行 hb_mapper_makertbin,对比 *_calibrated_model.onnx 的余弦相似度是否提升

如果方便,可以贴出你的校准数据生成脚本(或关键参数),我帮你核对是否有问题。

是的,无论使用何种前处理,校准数据集都是必须的,不然就是工具链随机生成的产物

校准数据准备:

  • 数据源:Dump 送入浮点 ONNX 模型之前 的数据(即已经过 Resize、Normalize、HWC->CHW 等 CPU 预处理后的数据)。
  • 格式:保存为 .bin 或 .npy。
  • 优势:此时量化模型(Quantized Model)的输入与浮点 Baseline 完全一致,排除了 BPU 硬件前处理(如 NV12 解码、缩放算法差异)带来的干扰,专注于量化本身的精度损失。

好的 感谢您提供的建议。 我之前也在重点排查数据集构造上 没有发现异常的地方 我再次去仔细校验一下 后续结果在反馈

好的,你的排查方向完全正确!既然你已经在重点检查数据集构造,我给你整理一个快速校验清单,方便逐项排查:


:clipboard: 校准数据校验清单

:one: 文件格式检查

# 单个文件大小应为 4,608,000 字节 (1×5×360×640×4)
ls -l ../hb_calibration_data_f32/*.feature | head -3

# 文件数量
ls ../hb_calibration_data_f32/*.feature | wc -l  # 建议 ≥100

:two: 数据分布快速诊断

import numpy as np, os

cal_dir = '../hb_calibration_data_f32'
files = sorted([f for f in os.listdir(cal_dir) if f.endswith('.feature')])
data = np.fromfile(os.path.join(cal_dir, files[0]), dtype=np.float32).reshape(5, 360, 640)

print("=== 单样本快速诊断 ===")
print(f"RGB 通道 (0-2) 均值: {data[:3].mean():.4f}, 标准差: {data[:3].std():.4f}")
print(f"  → 预期:均值接近 0,标准差接近 1")
print(f"Depth 通道 (3) 范围: [{data[3].min():.4f}, {data[3].max():.4f}]")
print(f"  → 预期:值域在 [0, 1] 内")
print(f"Mask 通道 (4) 唯一值: {np.unique(data[4])}")
print(f"  → 预期:只有 0 和 1")

:three: 关键参数核对表

参数 训练时值 校准时值 是否一致
RGB mean [0.485, 0.456, 0.406] ? □
RGB std [0.229, 0.224, 0.225] ? □
sensor_depth_max ? ? □
depth_min ? ? □
depth_max ? ? □
通道顺序 RGB(0-2) + depth(3) + mask(4) ? □
数据布局 5×360×640 (CHW) ? □

:four: 一致性验证(如果有训练时保存的 featuremap)

train_fm = np.fromfile('train_sample.feature', dtype=np.float32).reshape(5, 360, 640)
cal_fm = np.fromfile('../hb_calibration_data_f32/scene_003_27.feature', dtype=np.float32).reshape(5, 360, 640)

for i in range(5):
    max_diff = np.abs(train_fm[i] - cal_fm[i]).max()
    status = "✓" if max_diff < 1e-4 else "⚠️"
    print(f"{status} 通道{i}: 最大差异 = {max_diff:.6f}")

:magnifying_glass_tilted_left: 如果校验都通过,但精度仍低

可以尝试以下进阶调试手段:

方案 A:更换 calibration_type

calibration_parameters:
  calibration_type: 'max'  # 从 default 改为 max
  max_percentile: [0.9999, 1.0]
  per_channel: True

方案 B:分层 Dump 对比

在配置中开启 layer_out_dump: True,对比 original_float_model.onnx 和 calibrated_model.onnx 每一层的输出,定位具体是哪一层开始偏差变大。

方案 C:敏感层强制 CPU/Int16

从日志中余弦相似度 < 0.95 的层,在 node_info 中强制 CPU 运行或设为 int16。


:pushpin: 后续反馈建议

重新生成校准数据并运行后,可以反馈以下信息,方便进一步分析:

  1. 校准数据统计信息(步骤 2 的输出)
  2. 重新转换后的余弦相似度(特别是 segmentation 输出)
  3. 如果仍有问题:提供训练预处理脚本的关键参数

期待你的后续结果!:rocket:

根据昨天提供的建议 重新生成校验数据集 预处理部分与实际训练部分保持一致。从当前结果来看,有一点的提升,目前不看板端的部署,在标定阶段模型的输出矩阵 与 原始的onnx模型矩阵输出 还是存在一定差距,两者输出矩阵的方差和均值 之间的差值还是不在合理范围。目前问题1:模型本身输出两部分,第一部分是深度信息,这部分基本完全对应;第二部分是语义分割信息,这部分在标定阶段仍然相差比较大。
从转换日志来看,目前所有节点的相似度都位于0.95以上。在转换过程中,有以下异常日志,不清楚是不是影响因素,希望得到进一步的调整建议

2026-04-21 16:37:16,482 WARNING The output of Node(name:Resize_220, type:Resize) does not support data type: int16
2026-04-21 16:37:16,483 INFO Run calibration model with max-percentile:percentile=0.9999,per_channel method.
2026-04-21 16:37:16,846 INFO Calibration using batch 8
2026-04-21 16:37:17,060 WARNING The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
calibration in progress: 0%| | 0/25 [00:00<?, ?it/s]2026-04-21 16:37:17,144 WARNING The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8
2026-04-21 16:37:17,144 WARNING The input2 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int16
2026-04-21 16:37:17,144 WARNING The input2 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int8
2026-04-21 16:37:17,144 WARNING The output of Node(name:Resize_220) is int8, then requantized to int16
2026-04-21 16:37:19.110494472 [E:onnxruntime:, sequential_executor.cc:183 Execute] Non-zero status code returned while running Resize node. Name:‘Resize_169’ Status Message: /home/jenkins/agent/workspace/model_convert_hmct1_ut_cpu_1.1.0/onnxruntime/onnxruntime/core/providers/cpu/tensor/upsample.h:300 void onnxruntime::UpsampleBase::ScalesValidation(const std::vector&, onnxruntime::UpsampleMode) const scales.size() == 2 || (scales.size() == 4 && scales[0] == 1 && scales[1] == 1) was false. ‘Linear’ mode and ‘Cubic’ mode only support 2-D inputs (‘Bilinear’, ‘Bicubic’) or 4-D inputs with the corresponding outermost 2 scale values being 1 in the Resize operator

转换配置文件调整后如下:

model_parameters:
  onnx_model: '../lraspp_99_torch110.onnx'
  march: 'bayes-e'
  output_model_file_prefix: 'lraspp_99_torch110_3'
  working_dir: '../hb_mapper_output_2/lraspp_99_torch110_3'
  layer_out_dump: False

  node_info: {
              # "711_Cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              # "Where_263_cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              # "Where_263_equal": {'ON': 'BPU','InputType': 'int8','OutputType': 'int8'},
              # "Where_263_equal_output_cast": {'ON': 'BPU','InputType': 'int8','OutputType': 'int8'},
              # "ScatterND_337": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              # "Where_340_cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              # "Where_340_equal": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              # "Where_340_equal_output_cast": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              # "ScatterND_414": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
              "Conv_16": {'ON': 'CPU'},
              "Conv_14": {'ON': 'CPU'},
              "Conv_12": {'ON': 'CPU'},
              "Conv_9": {'ON': 'CPU'}
            }

input_parameters:
  input_name: 'input'
  # 当前最新模型真实输入不是纯 RGB,而是 5 通道 featuremap:
  #   0~2: RGB,已做 (x/255 - mean) / std
  #   3  : radar_range,先按 sensor_depth_max 解码到米制,再按 [depth_min, depth_max]
  #        截断并线性归一化到 [0, 1]
  #   4  : radar_valid_mask,取值 {0, 1}
  # 该输入口径必须与 export_onnx.py、test_and_visualize_onnx.py、
  # test_and_visualize_RDK_X5.py 保持完全一致。
  input_type_train: 'featuremap'
  input_layout_train: 'NCHW'
  input_type_rt: 'featuremap'
  input_layout_rt: 'NCHW'
  input_shape: '1x5x360x640'
  input_batch: 1

  # featuremap 输入要求上板前已经完成全部前处理,因此这里不能再走 rgb/nv12 预处理链
  norm_type: 'no_preprocess'

calibration_parameters:
  # 正式 PTQ 时,这里需要放“预处理后的 5 通道 float32 featuremap 校准数据”
  # 数据口径必须与 input_type_train/input_layout_train/input_shape 完全一致
  # 即每个样本都是 row-major 的 float32 二进制,shape = 1x5x360x640 或 5x360x640
  # 当前 featuremap 生成逻辑应与 02_generate_calibration_data.py 的最新版本一致。
  cal_data_dir: '../hb_calibration_data2_f32'
  cal_data_type: 'float32'
  preprocess_on: False
  per_channel: True
  # 如果已经准备好了代表性的最新 featuremap 校准集,建议保持 'default' 做正式 PTQ; 'skip'
  calibration_type: 'max'  
  max_percentile: 0.9999

compiler_parameters:
  compile_mode: 'latency'
  debug: False
  core_num: 1
  optimize_level: 'O3'
  # featuremap 输入通常从 DDR 喂入
  input_source: {'input': 'ddr'}

makerkbin日志如下:

2026-04-21 09:27:50,702 file: tool_utils.py func: tool_utils line No: 77 log will be stored in /open_explorer/test_lraspp_model_0420/hb_mapper_makertbin.log
2026-04-21 09:27:50,702 file: hb_mapper.py func: hb_mapper line No: 132 Start hb_mapper…
2026-04-21 09:27:50,702 file: hb_mapper.py func: hb_mapper line No: 133 hbdk version 3.49.15
2026-04-21 09:27:50,703 file: hb_mapper.py func: hb_mapper line No: 134 horizon_nn version 1.1.0
2026-04-21 09:27:50,703 file: hb_mapper.py func: hb_mapper line No: 135 hb_mapper version 1.24.3
2026-04-21 09:27:50,703 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 530 Start Model Convert…
2026-04-21 09:27:50,709 file: mapper_conf_parser.py func: mapper_conf_parser line No: 105 validating model_parameters…
2026-04-21 09:27:50,709 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1347 Using abs path /open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx
2026-04-21 09:27:50,709 file: mapper_conf_parser.py func: mapper_conf_parser line No: 260 Using onnx model file: /open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx
2026-04-21 09:27:50,746 file: onnx_parser.py func: onnx_parser line No: 39 Model input names: [‘input’]
2026-04-21 09:27:50,746 file: mapper_conf_parser.py func: mapper_conf_parser line No: 264 Model has 1 inputs according to model file
2026-04-21 09:27:50,746 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1347 Using abs path /open_explorer/test_lraspp_model_0420/hb_mapper_output_3/lraspp_99_torch110_3
2026-04-21 09:27:50,746 file: mapper_conf_parser.py func: mapper_conf_parser line No: 287 working_dir does not exist. Creating working_dir: /open_explorer/test_lraspp_model_0420/hb_mapper_output_3/lraspp_99_torch110_3
2026-04-21 09:27:50,747 file: mapper_conf_parser.py func: mapper_conf_parser line No: 438 node_dict: {self.node_dict}
2026-04-21 09:27:50,747 file: mapper_conf_parser.py func: mapper_conf_parser line No: 119 validating model_parameters finished
2026-04-21 09:27:50,747 file: mapper_conf_parser.py func: mapper_conf_parser line No: 123 validating input_parameters…
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 135 validating input_parameters finished
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 139 validating calibration_parameters…
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1347 Using abs path /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1013 The calibration dir name suffix is the same as the value float32 of the cal_data_type parameter and will be read with the value of cal_data_type.
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 155 validating calibration_parameters finished
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 159 validating custom_op…
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 1076 custom_op does not exist, skipped
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 165 validating custom_op finished
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 168 validating compiler_parameters…
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 183 validating compiler_parameters finished
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 187 validating deprecated parameters…
2026-04-21 09:27:50,748 file: mapper_conf_parser.py func: mapper_conf_parser line No: 193 validating deprecated parameters finished
2026-04-21 09:27:50,748 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 54 Dump config:
2026-04-21 09:27:50,748 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 55 calibration_parameters:
cal_data_dir: ../hb_calibration_data_f32
cal_data_type: float32
calibration_type: max
max_percentile: 0.9999
per_channel: true
preprocess_on: false
compiler_parameters:
compile_mode: latency
core_num: 1
debug: false
input_source:
input: ddr
optimize_level: O3
input_parameters:
input_batch: ‘1’
input_layout_rt: NCHW
input_layout_train: NCHW
input_name: input
input_shape: 1x5x360x640
input_type_rt: featuremap
input_type_train: featuremap
norm_type: no_preprocess
model_parameters:
layer_out_dump: false
march: bayes-e
node_info:
Conv_12:
‘ON’: CPU
Conv_14:
‘ON’: CPU
Conv_16:
‘ON’: CPU
Conv_9:
‘ON’: CPU
onnx_model: ../lraspp_99_torch110.onnx
output_model_file_prefix: lraspp_99_torch110_3
working_dir: ../hb_mapper_output_3/lraspp_99_torch110_3

2026-04-21 09:27:50,750 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 60 input ‘input’ : original model shape: [1, 5, 360, 640]

2026-04-21 09:27:50,751 file: loader.py func: loader line No: 204 *******************************************
2026-04-21 09:27:50,751 file: loader.py func: loader line No: 205 First calibration picture name: scene_001_38.bin
2026-04-21 09:27:50,751 file: loader.py func: loader line No: 207 First calibration picture md5:
2026-04-21 09:27:50,763 file: loader.py func: loader line No: 211 *******************************************
2026-04-21 09:27:50,764 file: loader.py func: loader line No: 282 created RawImageDirLoader of shape:[1, 5, 360, 640]
2026-04-21 09:27:50,764 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_001_38.bin
2026-04-21 09:27:50,766 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_002_31.bin
2026-04-21 09:27:50,778 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_002_33.bin
2026-04-21 09:27:50,789 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_003_43.bin
2026-04-21 09:27:50,800 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_003_57.bin
2026-04-21 09:27:50,811 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_004_44.bin
2026-04-21 09:27:50,822 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_005_11.bin
2026-04-21 09:27:50,833 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_006_00.bin
2026-04-21 09:27:50,844 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_007_24.bin
2026-04-21 09:27:50,855 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_008_32.bin
2026-04-21 09:27:50,866 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_009_50.bin
2026-04-21 09:27:50,877 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_011_17.bin
2026-04-21 09:27:50,888 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_012_05.bin
2026-04-21 09:27:50,899 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_013_10.bin
2026-04-21 09:27:50,910 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_014_36.bin
2026-04-21 09:27:50,921 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_015_47.bin
2026-04-21 09:27:50,932 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_016_53.bin
2026-04-21 09:27:50,943 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_017_56.bin
2026-04-21 09:27:50,953 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_018_20.bin
2026-04-21 09:27:50,964 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_019_19.bin
2026-04-21 09:27:50,975 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_021_56.bin
2026-04-21 09:27:50,986 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_022_27.bin
2026-04-21 09:27:50,997 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_023_13.bin
2026-04-21 09:27:51,008 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_024_27.bin
2026-04-21 09:27:51,019 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_025_08.bin
2026-04-21 09:27:51,030 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_026_28.bin
2026-04-21 09:27:51,041 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_026_30.bin
2026-04-21 09:27:51,052 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_027_00.bin
2026-04-21 09:27:51,063 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_027_36.bin
2026-04-21 09:27:51,074 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_028_17.bin
2026-04-21 09:27:51,085 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_028_31.bin
2026-04-21 09:27:51,096 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_029_51.bin
2026-04-21 09:27:51,107 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_031_39.bin
2026-04-21 09:27:51,118 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_032_38.bin
2026-04-21 09:27:51,129 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_033_08.bin
2026-04-21 09:27:51,140 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_034_16.bin
2026-04-21 09:27:51,151 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_034_30.bin
2026-04-21 09:27:51,162 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_035_35.bin
2026-04-21 09:27:51,173 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_035_49.bin
2026-04-21 09:27:51,184 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_036_43.bin
2026-04-21 09:27:51,195 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_037_03.bin
2026-04-21 09:27:51,206 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_037_28.bin
2026-04-21 09:27:51,217 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_038_08.bin
2026-04-21 09:27:51,228 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_039_30.bin
2026-04-21 09:27:51,239 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_041_49.bin
2026-04-21 09:27:51,250 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_042_14.bin
2026-04-21 09:27:51,261 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_042_51.bin
2026-04-21 09:27:51,272 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_043_34.bin
2026-04-21 09:27:51,283 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_044_00.bin
2026-04-21 09:27:51,294 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_045_05.bin
2026-04-21 09:27:51,305 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_046_47.bin
2026-04-21 09:27:51,316 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_047_16.bin
2026-04-21 09:27:51,327 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_047_50.bin
2026-04-21 09:27:51,338 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_048_59.bin
2026-04-21 09:27:51,349 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_049_39.bin
2026-04-21 09:27:51,359 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_101_33.bin
2026-04-21 09:27:51,370 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_102_22.bin
2026-04-21 09:27:51,381 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_102_31.bin
2026-04-21 09:27:51,392 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_103_44.bin
2026-04-21 09:27:51,403 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_104_33.bin
2026-04-21 09:27:51,414 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_104_38.bin
2026-04-21 09:27:51,425 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_105_50.bin
2026-04-21 09:27:51,436 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_105_58.bin
2026-04-21 09:27:51,447 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_106_19.bin
2026-04-21 09:27:51,458 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_107_25.bin
2026-04-21 09:27:51,469 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_107_30.bin
2026-04-21 09:27:51,480 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_108_44.bin
2026-04-21 09:27:51,491 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_109_23.bin
2026-04-21 09:27:51,502 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_111_36.bin
2026-04-21 09:27:51,513 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_112_08.bin
2026-04-21 09:27:51,524 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_113_13.bin
2026-04-21 09:27:51,535 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_113_56.bin
2026-04-21 09:27:51,546 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_114_00.bin
2026-04-21 09:27:51,557 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_115_59.bin
2026-04-21 09:27:51,568 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_116_09.bin
2026-04-21 09:27:51,579 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_117_41.bin
2026-04-21 09:27:51,590 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_117_56.bin
2026-04-21 09:27:51,601 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_118_11.bin
2026-04-21 09:27:51,612 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_118_15.bin
2026-04-21 09:27:51,623 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_119_12.bin
2026-04-21 09:27:51,634 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_119_24.bin
2026-04-21 09:27:51,645 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_121_01.bin
2026-04-21 09:27:51,656 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_122_00.bin
2026-04-21 09:27:51,667 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_123_58.bin
2026-04-21 09:27:51,678 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_124_10.bin
2026-04-21 09:27:51,689 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_125_08.bin
2026-04-21 09:27:51,700 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_125_39.bin
2026-04-21 09:27:51,711 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_126_16.bin
2026-04-21 09:27:51,722 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_126_55.bin
2026-04-21 09:27:51,733 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_127_27.bin
2026-04-21 09:27:51,744 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_127_32.bin
2026-04-21 09:27:51,755 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_128_37.bin
2026-04-21 09:27:51,766 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_129_41.bin
2026-04-21 09:27:51,777 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_129_56.bin
2026-04-21 09:27:51,788 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_131_19.bin
2026-04-21 09:27:51,799 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_132_42.bin
2026-04-21 09:27:51,810 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_133_46.bin
2026-04-21 09:27:51,821 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_134_00.bin
2026-04-21 09:27:51,832 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_135_57.bin
2026-04-21 09:27:51,843 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_136_39.bin
2026-04-21 09:27:51,854 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_137_20.bin
2026-04-21 09:27:51,865 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_137_48.bin
2026-04-21 09:27:51,875 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_138_22.bin
2026-04-21 09:27:51,886 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_138_46.bin
2026-04-21 09:27:51,897 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_139_29.bin
2026-04-21 09:27:51,908 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_141_27.bin
2026-04-21 09:27:51,919 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_142_19.bin
2026-04-21 09:27:51,930 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_142_58.bin
2026-04-21 09:27:51,941 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_143_02.bin
2026-04-21 09:27:51,952 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_144_31.bin
2026-04-21 09:27:51,963 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_145_01.bin
2026-04-21 09:27:51,974 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_146_11.bin
2026-04-21 09:27:51,985 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_147_16.bin
2026-04-21 09:27:51,996 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_148_25.bin
2026-04-21 09:27:52,007 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_149_15.bin
2026-04-21 09:27:52,018 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_149_54.bin
2026-04-21 09:27:52,029 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_211_56.bin
2026-04-21 09:27:52,040 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_212_44.bin
2026-04-21 09:27:52,051 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_213_37.bin
2026-04-21 09:27:52,062 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_214_19.bin
2026-04-21 09:27:52,073 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_215_15.bin
2026-04-21 09:27:52,084 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_216_09.bin
2026-04-21 09:27:52,095 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_216_20.bin
2026-04-21 09:27:52,106 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_217_27.bin
2026-04-21 09:27:52,117 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_218_42.bin
2026-04-21 09:27:52,128 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_218_47.bin
2026-04-21 09:27:52,139 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_219_15.bin
2026-04-21 09:27:52,150 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_219_22.bin
2026-04-21 09:27:52,161 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_221_16.bin
2026-04-21 09:27:52,172 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_221_32.bin
2026-04-21 09:27:52,183 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_222_12.bin
2026-04-21 09:27:52,194 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_223_29.bin
2026-04-21 09:27:52,205 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_224_28.bin
2026-04-21 09:27:52,216 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_225_08.bin
2026-04-21 09:27:52,227 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_226_07.bin
2026-04-21 09:27:52,238 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_227_19.bin
2026-04-21 09:27:52,249 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_227_48.bin
2026-04-21 09:27:52,260 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_228_46.bin
2026-04-21 09:27:52,271 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_228_49.bin
2026-04-21 09:27:52,282 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_229_55.bin
2026-04-21 09:27:52,293 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_231_28.bin
2026-04-21 09:27:52,304 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_232_20.bin
2026-04-21 09:27:52,315 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_233_17.bin
2026-04-21 09:27:52,326 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_234_48.bin
2026-04-21 09:27:52,337 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_235_39.bin
2026-04-21 09:27:52,348 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_236_43.bin
2026-04-21 09:27:52,359 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_237_53.bin
2026-04-21 09:27:52,370 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_238_17.bin
2026-04-21 09:27:52,381 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_239_30.bin
2026-04-21 09:27:52,392 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_241_39.bin
2026-04-21 09:27:52,403 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_242_57.bin
2026-04-21 09:27:52,414 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_243_31.bin
2026-04-21 09:27:52,424 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_244_14.bin
2026-04-21 09:27:52,435 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_245_14.bin
2026-04-21 09:27:52,446 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_246_10.bin
2026-04-21 09:27:52,457 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_247_06.bin
2026-04-21 09:27:52,468 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_247_32.bin
2026-04-21 09:27:52,479 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_248_25.bin
2026-04-21 09:27:52,490 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_248_48.bin
2026-04-21 09:27:52,501 file: loader.py func: loader line No: 287 Read raw file: /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32/scene_249_57.bin
2026-04-21 09:27:52,512 file: tool_utils.py func: tool_utils line No: 368 num of calibration data: 160
2026-04-21 09:27:52,512 file: tool_utils.py func: tool_utils line No: 369 calibration data shape: (1, 5, 360, 640)
2026-04-21 09:27:52,589 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 519 call build params:
, dtype=float32)]}, ‘per_channel’: True, ‘max_percentile’: 0.9999}, ‘hbdk_dict’: {‘hbdk_pass_through_params’: ‘–O3 --core-num 1 --fast ‘, ‘input-source’: {‘input’: ‘ddr’, ‘_default_value’: ‘ddr’}}, ‘node_dict’: {‘Conv_16’: {‘ON’: ‘CPU’}, ‘Conv_14’: {‘ON’: ‘CPU’}, ‘Conv_12’: {‘ON’: ‘CPU’}, ‘Conv_9’: {‘ON’: ‘CPU’}}, ‘check_mode’: False}
2026-04-21 09:27:52,599 file: model_builder.py func: model_builder line No: 35 Start to Horizon NN Model Convert.
2026-04-21 09:27:52,654 file: model_debugger.py func: model_debugger line No: 67 Loading horizon_nn debug methods:set()
2026-04-21 09:27:52,654 file: quantization_config.py func: quantization_config line No: 305 The activation calibration parameters:
calibration_type: max
max_percentile: 0.9999
per_channel: True
There are 4 nodes designated to run on the cpu: [‘Conv_16’, ‘Conv_14’, ‘Conv_12’, ‘Conv_9’].
2026-04-21 09:27:52,654 file: model_builder.py func: model_builder line No: 197 The specified model compilation architecture: bayes-e.
2026-04-21 09:27:52,654 file: model_builder.py func: model_builder line No: 207 The specified model compilation optimization parameters: .
2026-04-21 09:27:52,654 file: model_builder.py func: model_builder line No: 35 Start to prepare the onnx model.
2026-04-21 09:27:52,669 file: prepare.py func: prepare line No: 106 Input ONNX Model Information:
ONNX IR version: 7
Opset version: [‘ai.onnx v11’, ‘horizon v1’]
Producer: pytorch v1.10
Domain: None
Version: None
Graph input:
input: shape=[1, 5, 360, 640], dtype=FLOAT32
Graph output:
…entation: shape=[‘ScatterNDsegmentation_dim_0’, ‘ScatterNDsegmentation_dim_1’, ‘ScatterNDsegmentation_dim_2’, ‘ScatterNDsegmentation_dim_3’], dtype=FLOAT32
depth: shape=[‘Sigmoiddepth_dim_0’, 1, ‘Sigmoiddepth_dim_2’, ‘Sigmoiddepth_dim_3’], dtype=FLOAT32
2026-04-21 09:27:52,750 file: model_builder.py func: model_builder line No: 38 End to prepare the onnx model.
2026-04-21 09:27:52,771 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_3_original_float_model.onnx.
2026-04-21 09:27:52,771 file: model_builder.py func: model_builder line No: 35 Start to optimize the onnx model.
2026-04-21 09:27:54,205 file: constant_folding.py func: constant_folding line No: 66 Summary info for constant_folding:
2026-04-21 09:27:54,205 file: constant_folding.py func: constant_folding line No: 67 After constant_folding, the number of nodes has changed from 415 to 207.
2026-04-21 09:27:54,205 file: constant_folding.py func: constant_folding line No: 71 After constant_folding, the number of parameters has changed from 3407002 to 22299713.
2026-04-21 09:27:54,205 file: constant_folding.py func: constant_folding line No: 76 Detailed info for constant_folding:
2026-04-21 09:27:54,205 file: constant_folding.py func: constant_folding line No: 88 After folding node (op_name: ConstantOfShape_244, op_type: ConstantOfShape), the number of increased parameters is 3455995.
After folding node (op_name: Expand_380, op_type: Expand), the number of increased parameters is 2995195.
After folding node (op_name: Expand_388, op_type: Expand), the number of increased parameters is 2995183.
After folding node (op_name: Expand_396, op_type: Expand), the number of increased parameters is 2994836.
After folding node (op_name: Expand_404, op_type: Expand), the number of increased parameters is 2994556.
After folding node (op_name: Add_372, op_type: Add), the number of increased parameters is 2990520.
After folding node (op_name: Gather_262, op_type: Gather), the number of increased parameters is 691197.
After folding node (op_name: Expand_303, op_type: Expand), the number of increased parameters is 691195.
After folding node (op_name: Expand_311, op_type: Expand), the number of increased parameters is 691193.
After folding node (op_name: Expand_319, op_type: Expand), the number of increased parameters is 690836.
After folding node (op_name: Expand_327, op_type: Expand), the number of increased parameters is 690556.
After folding node (op_name: Add_295, op_type: Add), the number of increased parameters is 690120.
After folding node (op_name: Add_371, op_type: Add), the number of increased parameters is 4667.
After folding node (op_name: Add_294, op_type: Add), the number of increased parameters is 1077.
After folding node (op_name: Range_286, op_type: Range), the number of increased parameters is 637.
After folding node (op_name: Range_363, op_type: Range), the number of increased parameters is 637.
After folding node (op_name: Range_279, op_type: Range), the number of increased parameters is 357.
After folding node (op_name: Range_356, op_type: Range), the number of increased parameters is 357.
After folding node (op_name: Mul_300, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_308, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_316, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_324, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_377, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_385, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_393, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: Mul_401, op_type: Mul), the number of increased parameters is 3.
After folding node (op_name: ConstantOfShape_298, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_306, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_314, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_322, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_375, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_383, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_391, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: ConstantOfShape_399, op_type: ConstantOfShape), the number of increased parameters is 2.
After folding node (op_name: Concat_166, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Concat_188, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Concat_201, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Concat_217, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Concat_226, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_240, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_241, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_242, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Concat_243, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Cast_269, op_type: Cast), the number of increased parameters is 0.
After folding node (op_name: Cast_276, op_type: Cast), the number of increased parameters is 0.
After folding node (op_name: Cast_283, op_type: Cast), the number of increased parameters is 0.
After folding node (op_name: Add_293, op_type: Add), the number of increased parameters is 0.
After folding node (op_name: Cast_346, op_type: Cast), the number of increased parameters is 0.
After folding node (op_name: Cast_353, op_type: Cast), the number of increased parameters is 0.
After folding node (op_name: Cast_360, op_type: Cast), the number of increased parameters is 0.
After folding node (op_name: Add_370, op_type: Add), the number of increased parameters is 0.
After folding node (op_name: Equal_301, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_304, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Equal_309, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_312, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Equal_317, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_320, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Equal_325, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_328, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Concat_329, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Concat_335, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Equal_378, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_381, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Equal_386, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_389, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Equal_394, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_397, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Equal_402, op_type: Equal), the number of increased parameters is 0.
After folding node (op_name: Unsqueeze_405, op_type: Unsqueeze), the number of increased parameters is 0.
After folding node (op_name: Concat_406, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Concat_412, op_type: Concat), the number of increased parameters is 0.
After folding node (op_name: Range_272, op_type: Range), the number of increased parameters is -2.
After folding node (op_name: Reshape_291, op_type: Reshape), the number of increased parameters is -2.
After folding node (op_name: Range_349, op_type: Range), the number of increased parameters is -2.
After folding node (op_name: Reshape_368, op_type: Reshape), the number of increased parameters is -2.
After folding node (op_name: Gather_233, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_236, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_239, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_268, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_275, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_282, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Reshape_288, op_type: Reshape), the number of increased parameters is -4.
After folding node (op_name: Gather_345, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_352, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Gather_359, op_type: Gather), the number of increased parameters is -4.
After folding node (op_name: Reshape_365, op_type: Reshape), the number of increased parameters is -4.
After folding node (op_name: Where_302, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_310, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_318, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_326, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_379, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_387, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_395, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Where_403, op_type: Where), the number of increased parameters is -4.
After folding node (op_name: Slice_165, op_type: Slice), the number of increased parameters is -5.
After folding node (op_name: Slice_187, op_type: Slice), the number of increased parameters is -5.
After folding node (op_name: Slice_200, op_type: Slice), the number of increased parameters is -5.
After folding node (op_name: Slice_216, op_type: Slice), the number of increased parameters is -5.
After folding node (op_name: Slice_225, op_type: Slice), the number of increased parameters is -5.
After folding node (op_name: Slice_334, op_type: Slice), the number of increased parameters is -7.
After folding node (op_name: Slice_411, op_type: Slice), the number of increased parameters is -7.
2026-04-21 09:27:54,702 file: model_builder.py func: model_builder line No: 38 End to optimize the onnx model.
2026-04-21 09:27:54,811 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_3_optimized_float_model.onnx.
2026-04-21 09:27:54,811 file: model_builder.py func: model_builder line No: 35 Start to calibrate the model.
2026-04-21 09:27:55,167 file: calibration_data_set.py func: calibration_data_set line No: 111 input name: input, number_of_samples: 160
2026-04-21 09:27:55,167 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Resize_220, type:Resize) does not support data type: int16
2026-04-21 09:27:55,167 file: calibration_data_set.py func: calibration_data_set line No: 123 There are 160 samples in the data set.
2026-04-21 09:27:55,167 file: infer_thresholds.py func: infer_thresholds line No: 84 Run calibration model with max-percentile:percentile=0.9999,per_channel method.
2026-04-21 09:27:55,423 file: base.py func: base line No: 138 Calibration using batch 8
2026-04-21 09:27:55,658 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
2026-04-21 09:27:55,659 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8
2026-04-21 09:27:55,659 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int16
2026-04-21 09:27:55,659 file: tool_utils.py func: tool_utils line No: 321 The input2 of Node(name:ScatterND_414, type:ScatterND) does not support data type: int8
2026-04-21 09:27:55,659 file: tool_utils.py func: tool_utils line No: 321 The output of Node(name:Resize_220) is int8, then requantized to int16
2026-04-21 09:27:57,285 file: ort.py func: ort line No: 207 Reset batch_size=1 and execute forward again…
2026-04-21 09:29:00,463 file: base.py func: base line No: 138 Calibration using batch 8
2026-04-21 09:29:06,433 file: ort.py func: ort line No: 207 Reset batch_size=1 and execute forward again…
2026-04-21 09:31:37,941 file: modelwise_search.py func: modelwise_search line No: 62 Perchannel quantization is enabled.
2026-04-21 09:31:39,045 file: refine_threshold.py func: refine_threshold line No: 39 find illegal threshold in Add_258708_expand_dims_HzCalibration, it will be set default.
2026-04-21 09:31:39,229 file: model_builder.py func: model_builder line No: 38 End to calibrate the model.
2026-04-21 09:31:39,427 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_3_calibrated_model.onnx.
2026-04-21 09:31:39,427 file: model_builder.py func: model_builder line No: 35 Start to quantize the model.
2026-04-21 09:31:41,598 file: constant_folding.py func: constant_folding line No: 66 Summary info for constant_folding:
2026-04-21 09:31:41,598 file: constant_folding.py func: constant_folding line No: 67 After constant_folding, the number of nodes has changed from 189 to 188.
2026-04-21 09:31:41,599 file: constant_folding.py func: constant_folding line No: 71 After constant_folding, the number of parameters has changed from 22325014 to 22325014.
2026-04-21 09:31:41,599 file: constant_folding.py func: constant_folding line No: 76 Detailed info for constant_folding:
2026-04-21 09:31:41,599 file: constant_folding.py func: constant_folding line No: 88 After folding node (op_name: Where_263_mul_x_NCHW2NHWC_LayoutConvert_Input1, op_type: Transpose), the number of increased parameters is 0.
2026-04-21 09:31:41,767 file: model_builder.py func: model_builder line No: 38 End to quantize the model.
2026-04-21 09:31:41,948 file: model_builder.py func: model_builder line No: 265 Saving model to: lraspp_99_torch110_3_quantized_model.onnx.
2026-04-21 09:31:41,948 file: model_builder.py func: model_builder line No: 35 Start to compile the model with march bayes-e.
2026-04-21 09:31:42,848 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_0
2026-04-21 09:31:42,914 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:[’–O3’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr’]
2026-04-21 09:31:42,914 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_0.hbir -o /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_0.hbm --march bayes-e --progressbar --O3 --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr
2026-04-21 09:31:49,033 file: tool_utils.py func: tool_utils line No: 326 consumed time 6.10509
2026-04-21 09:31:49,058 file: tool_utils.py func: tool_utils line No: 326 FPS=437.1, latency = 2287.8 us, DDR = 15902272 bytes (see torch-jit-export_subgraph_0.html)
2026-04-21 09:31:49,059 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_1
2026-04-21 09:31:49,125 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:[‘–O3’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr’]
2026-04-21 09:31:49,125 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_1.hbir -o /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_1.hbm --march bayes-e --progressbar --O3 --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr
2026-04-21 09:31:49,499 file: tool_utils.py func: tool_utils line No: 326 consumed time 0.360407
2026-04-21 09:31:49,525 file: tool_utils.py func: tool_utils line No: 326 FPS=1243.23, latency = 804.4 us, DDR = 3819136 bytes (see torch-jit-export_subgraph_1.html)
2026-04-21 09:31:49,526 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_2
2026-04-21 09:31:49,606 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:[‘–O3’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr,ddr,ddr,ddr,ddr’]
2026-04-21 09:31:49,606 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_2.hbir -o /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_2.hbm --march bayes-e --progressbar --O3 --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr,ddr,ddr,ddr,ddr
2026-04-21 09:36:44,974 file: tool_utils.py func: tool_utils line No: 326 consumed time 295.354
2026-04-21 09:36:45,062 file: tool_utils.py func: tool_utils line No: 326 FPS=45.31, latency = 22067.9 us, DDR = 111472032 bytes (see torch-jit-export_subgraph_2.html)
2026-04-21 09:36:45,074 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_3
2026-04-21 09:36:45,153 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:[‘–O3’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr,ddr,ddr’]
2026-04-21 09:36:45,153 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_3.hbir -o /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_3.hbm --march bayes-e --progressbar --O3 --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr,ddr,ddr
2026-04-21 09:38:57,565 file: tool_utils.py func: tool_utils line No: 326 consumed time 132.398
2026-04-21 09:38:57,621 file: tool_utils.py func: tool_utils line No: 326 FPS=329.74, latency = 3032.7 us, DDR = 7373952 bytes (see torch-jit-export_subgraph_3.html)
2026-04-21 09:38:57,623 file: hybrid_build.py func: hybrid_build line No: 111 Compile submodel: torch-jit-export_subgraph_4
2026-04-21 09:38:57,705 file: hbdk_cc.py func: hbdk_cc line No: 126 hbdk-cc parameters:[‘–O3’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr,ddr,ddr,ddr’]
2026-04-21 09:38:57,705 file: hbdk_cc.py func: hbdk_cc line No: 127 hbdk-cc command used:hbdk-cc -f hbir -m /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_4.hbir -o /tmp/tmpi4ba5kw9/torch-jit-export_subgraph_4.hbm --march bayes-e --progressbar --O3 --core-num 1 --fast --input-layout NHWC --output-layout NHWC --input-source ddr,ddr,ddr,ddr
2026-04-21 09:39:02,079 file: tool_utils.py func: tool_utils line No: 326 consumed time 4.35772
2026-04-21 09:39:02,116 file: tool_utils.py func: tool_utils line No: 326 FPS=91.67, latency = 10909.0 us, DDR = 91010688 bytes (see torch-jit-export_subgraph_4.html)
2026-04-21 09:39:02,463 file: model_builder.py func: model_builder line No: 38 End to compile the model with march bayes-e.
2026-04-21 09:39:08,876 file: print_info_dict.py func: print_info_dict line No: 72 The main quantized node information:

Node ON Subgraph Type Cosine Similarity Threshold DataType

Conv_0 BPU id(0) HzSQuantizedConv 0.998309 2.60514 int8

Mul_2 BPU id(0) HzLut 0.997139 10.1118 int8
Conv_3 BPU id(0) HzSQuantizedConv 0.994793 8.38896 int8
Conv_5 BPU id(0) HzSQuantizedConv 0.993418 10.6208 int8
Conv_7 BPU id(0) HzSQuantizedConv 0.993278 13.4133 int8
Conv_9 CPU – Conv 0.989467 – float
Relu_10 CPU – Relu 0.990015 – float
Conv_11 BPU id(1) HzSQuantizedConv 0.989663 7.45639 int8
Conv_12 CPU – Conv 0.986825 7.40217 float
Relu_13 CPU – Relu 0.987840 – float
Conv_14 CPU – Conv 0.977120 – float
Relu_15 CPU – Relu 0.979368 – float
Conv_16 CPU – Conv 0.971340 – float
Add_17 BPU id(2) HzSElementwiseAdd 0.983921 6.92611 int8
Conv_18 BPU id(2) HzSQuantizedConv 0.984484 9.87873 int8
Conv_20 BPU id(2) HzSQuantizedConv 0.984612 2.64261 int8
GlobalAveragePool_22 BPU id(2) HzSQuantizedGlobalAveragePool 0.998466 6.95949 int8
Conv_23 BPU id(2) HzSQuantizedConv 0.998787 1.58743 int8
Conv_25 BPU id(2) HzSQuantizedConv 0.999284 3.06873 int8
HardSigmoid_26 BPU id(2) HzLut 0.999949 3.0 int8
Mul_27 BPU id(2) HzSElementwiseMul 0.986420 6.95949 int8
Conv_28 BPU id(2) HzSQuantizedConv 0.982549 3.88759 int8
Conv_29 BPU id(2) HzSQuantizedConv 0.982631 8.91332 int8
Conv_31 BPU id(2) HzSQuantizedConv 0.979667 10.7328 int8
GlobalAveragePool_33 BPU id(2) HzSQuantizedGlobalAveragePool 0.998107 6.64232 int8
Conv_34 BPU id(2) HzSQuantizedConv 0.997877 1.38505 int8
Conv_36 BPU id(2) HzSQuantizedConv 0.997588 2.83628 int8
HardSigmoid_37 BPU id(2) HzLut 0.999923 3.0 int8
Mul_38 BPU id(2) HzSElementwiseMul 0.978875 6.64232 int8
Conv_39 BPU id(2) HzSQuantizedConv 0.975257 3.49788 int8
Conv_41 BPU id(2) HzSQuantizedConv 0.979784 9.72655 int8
Conv_43 BPU id(2) HzSQuantizedConv 0.974731 5.83646 int8
GlobalAveragePool_45 BPU id(2) HzSQuantizedGlobalAveragePool 0.998106 6.22035 int8
Conv_46 BPU id(2) HzSQuantizedConv 0.999069 1.35851 int8
Conv_48 BPU id(2) HzSQuantizedConv 0.998553 2.50488 int8
HardSigmoid_49 BPU id(2) HzLut 0.999941 3.0 int8
Mul_50 BPU id(2) HzSElementwiseMul 0.974749 6.22035 int8
Conv_51 BPU id(2) HzSQuantizedConv 0.968424 3.42053 int8
Conv_53 BPU id(2) HzSQuantizedConv 0.978660 11.719 int8
Mul_55 BPU id(2) HzLut 0.977702 6.18352 int8
Conv_56 BPU id(2) HzSQuantizedConv 0.976418 5.49882 int8
Mul_58 BPU id(2) HzLut 0.974499 6.70217 int8
Conv_59 BPU id(2) HzSQuantizedConv 0.976176 6.17035 int8
Conv_60 BPU id(2) HzSQuantizedConv 0.976607 5.96844 int8
Mul_62 BPU id(2) HzLut 0.975493 5.96307 int8
Conv_63 BPU id(2) HzSQuantizedConv 0.976048 5.39971 int8
Mul_65 BPU id(2) HzLut 0.974901 7.23024 int8
Conv_66 BPU id(2) HzSQuantizedConv 0.976734 6.45607 int8
Conv_68 BPU id(2) HzSQuantizedConv 0.977740 9.73712 int8
Mul_70 BPU id(2) HzLut 0.974884 6.1501 int8
Conv_71 BPU id(2) HzSQuantizedConv 0.974218 5.51793 int8
Mul_73 BPU id(2) HzLut 0.971723 7.61577 int8
Conv_74 BPU id(2) HzSQuantizedConv 0.970660 6.46644 int8
Conv_76 BPU id(2) HzSQuantizedConv 0.976590 12.7433 int8
Mul_78 BPU id(2) HzLut 0.973849 6.101 int8
Conv_79 BPU id(2) HzSQuantizedConv 0.972180 5.49539 int8
Mul_81 BPU id(2) HzLut 0.970315 7.35668 int8
Conv_82 BPU id(2) HzSQuantizedConv 0.970334 6.85795 int8
Conv_84 BPU id(2) HzSQuantizedConv 0.977750 14.7823 int8
Mul_86 BPU id(2) HzLut 0.975757 6.50371 int8
Conv_87 BPU id(2) HzSQuantizedConv 0.980015 5.84439 int8
Mul_89 BPU id(2) HzLut 0.978191 7.02248 int8
GlobalAveragePool_90 BPU id(2) HzSQuantizedGlobalAveragePool 0.987631 6.00915 int8
Conv_91 BPU id(2) HzSQuantizedConv 0.991135 0.735733 int8
Conv_93 BPU id(2) HzSQuantizedConv 0.986457 1.31595 int8
HardSigmoid_94 BPU id(2) HzLut 0.999951 3.0 int8
Mul_95 BPU id(2) HzSElementwiseMul 0.977919 6.00915 int8
Conv_96 BPU id(2) HzSQuantizedConv 0.982481 3.01919 int8
Conv_97 BPU id(2) HzSQuantizedConv 0.981002 6.12108 int8
Mul_99 BPU id(2) HzLut 0.978285 6.09146 int8
Conv_100 BPU id(2) HzSQuantizedConv 0.979225 5.3224 int8
Mul_102 BPU id(2) HzLut 0.976457 6.42492 int8
GlobalAveragePool_103 BPU id(2) HzSQuantizedGlobalAveragePool 0.985875 5.50206 int8
Conv_104 BPU id(2) HzSQuantizedConv 0.987868 0.716637 int8
Conv_106 BPU id(2) HzSQuantizedConv 0.987471 1.25979 int8
HardSigmoid_107 BPU id(2) HzLut 0.999957 3.0 int8
Mul_108 BPU id(2) HzSElementwiseMul 0.976072 5.50206 int8
Conv_109 BPU id(2) HzSQuantizedConv 0.978424 2.75737 int8
Conv_111 BPU id(2) HzSQuantizedConv 0.983368 9.25892 int8
Mul_113 BPU id(2) HzLut 0.981446 5.96636 int8
Conv_114 BPU id(2) HzSQuantizedConv 0.984519 5.35833 int8
Mul_116 BPU id(2) HzLut 0.983440 5.25003 int8
GlobalAveragePool_117 BPU id(2) HzSQuantizedGlobalAveragePool 0.990771 4.55044 int8
Conv_118 BPU id(2) HzSQuantizedConv 0.989800 0.679636 int8
Conv_120 BPU id(2) HzSQuantizedConv 0.988839 1.42778 int8
HardSigmoid_121 BPU id(2) HzLut 0.999939 3.0 int8
Mul_122 BPU id(2) HzSElementwiseMul 0.983346 4.55044 int8
Conv_123 BPU id(2) HzSQuantizedConv 0.986712 2.30824 int8
Conv_124 BPU id(2) HzSQuantizedConv 0.984841 3.97706 int8
Mul_126 BPU id(2) HzLut 0.982245 4.26568 int8
Conv_127 BPU id(2) HzSQuantizedConv 0.983605 3.91516 int8
Mul_129 BPU id(2) HzLut 0.981652 4.61371 int8
GlobalAveragePool_130 BPU id(2) HzSQuantizedGlobalAveragePool 0.987529 4.02593 int8
Conv_131 BPU id(2) HzSQuantizedConv 0.986318 0.831746 int8
Conv_133 BPU id(2) HzSQuantizedConv 0.987175 1.60407 int8
HardSigmoid_134 BPU id(2) HzLut 0.999947 3.0 int8
Mul_135 BPU id(2) HzSElementwiseMul 0.981438 4.02593 int8
Conv_136 BPU id(2) HzSQuantizedConv 0.978783 2.02635 int8
Conv_138 BPU id(2) HzSQuantizedConv 0.980871 5.57953 int8
Mul_140 BPU id(2) HzLut 0.978621 4.08763 int8
Conv_141 BPU id(2) HzSQuantizedConv 0.979084 3.83882 int8
Mul_143 BPU id(2) HzLut 0.976968 4.69576 int8
GlobalAveragePool_144 BPU id(2) HzSQuantizedGlobalAveragePool 0.982400 4.15493 int8
Conv_145 BPU id(2) HzSQuantizedConv 0.983962 0.940707 int8
Conv_147 BPU id(2) HzSQuantizedConv 0.980998 1.45592 int8
HardSigmoid_148 BPU id(2) HzLut 0.999926 3.0 int8
Mul_149 BPU id(2) HzSElementwiseMul 0.976695 4.15493 int8
Conv_150 BPU id(2) HzSQuantizedConv 0.968621 2.1268 int8
Conv_152 BPU id(2) HzSQuantizedConv 0.977925 7.32364 int8
Mul_154 BPU id(2) HzLut 0.975601 4.23463 int8
Conv_155 BPU id(2) HzSQuantizedConv 0.977926 3.96237 int8
GlobalAveragePool_157 BPU id(2) HzSQuantizedGlobalAveragePool 0.989242 3.96237 int8
Conv_158 BPU id(2) HzSQuantizedConv 0.999795 1.09325 int8
Sigmoid_159 BPU id(2) HzLut 0.999980 5.49897 int8
Mul_160 BPU id(2) HzSElementwiseMul 0.982577 6.08904 int8
Resize_169 BPU id(2) HzQuantizedRoiResize 0.986607 4.27314 int8
Conv_170 BPU id(1) HzSQuantizedConv 0.987874 7.40217 int8
Conv_171 BPU id(2) HzSQuantizedConv 0.993835 4.27314 int8
Conv_173 BPU id(1) HzSQuantizedConv 0.991438 7.40217 int8
Conv_174 BPU id(2) HzSQuantizedConv 0.993667 4.27314 int8
Conv_176 BPU id(1) HzSQuantizedConv 0.991848 7.40217 int8
598_calibrated_Requantize BPU id(2) HzRequantize – – int8
Concat_178 BPU id(2) Concat 0.988197 4.70882 int8
Conv_179 BPU id(2) HzSQuantizedConv 0.992352 4.70882 int8
Conv_181 BPU id(2) HzSQuantizedConv 0.991838 3.59536 int8
Resize_191 BPU id(2) HzQuantizedRoiResize 0.993079 3.71989 int8
Conv_192 BPU id(2) HzSQuantizedConv 0.994828 3.71989 int8
Conv_194 BPU id(2) HzSQuantizedConv 0.992749 3.43919 int8
Resize_204 BPU id(2) HzQuantizedRoiResize 0.993029 3.53496 int8
Conv_205 BPU id(2) HzSQuantizedConv 0.994477 3.53496 int8
Conv_207 BPU id(2) HzSQuantizedConv 0.992256 2.89034 int8
Conv_209 BPU id(2) HzSQuantizedConv 0.994002 3.29272 int8
Conv_211 BPU id(2) HzSQuantizedConv 0.991143 3.982 int8
601_calibrated_Requantize BPU id(2) HzRequantize – – int16
Resize_220 BPU id(2) HzQuantizedRoiResize 0.993847 17.5442 int8
Resize_229 BPU id(2) HzQuantizedRoiResize 0.994334 27.7145 int8
Sigmoid_230 BPU id(2) HzLut2Layer 0.999847 11.0903 int16
665_Requantize BPU id(2) HzRequantize – – int8
Slice_249 BPU id(2) Slice 0.994551 17.5442 int16
ReduceMax_250 BPU id(2) HzQuantizedReduceMax 0.993381 17.5442 int16
Slice_255 BPU id(2) Slice 0.993595 27.7145 int8
ReduceMax_256 BPU id(2) HzQuantizedReduceMax 0.996320 27.7145 int8
Add_258 BPU id(2) HzSElementwiseAdd 0.996321 27.7145 int8
Less_259 BPU id(2) HzQuantizedComparison 0.984451 23.7483 int16
711_Cast CPU – Cast – – float
Where_263_cast CPU – Cast 0.993778 – bool
Where_263_mul_x BPU id(3) HzSElementwiseMul 0.993777 127.0 int8
Where_263_equal CPU – Equal 0.984451 127.0 float
Where_263_equal_output_cast CPU – Cast 0.984451 – bool
Where_263_mul_y BPU id(3) HzSElementwiseMul 0.993190 127.0 int16
Where_263_add BPU id(3) HzSElementwiseAdd 0.993778 10000.0 int8
ScatterND_337 CPU – ScatterND 0.999055 – float
Gather_339 BPU id(4) Gather 0.999649 10000.0 int8
Where_340_cast CPU – Cast 0.993778 – bool
Where_340_mul_x BPU id(4) HzSElementwiseMul 0.986645 127.0 int8
Where_340_equal CPU – Equal 0.984451 127.0 float
Where_340_equal_output_cast CPU – Cast 0.984451 – bool
Where_340_mul_y BPU id(4) HzSElementwiseMul 0.984451 127.0 int8
Where_340_add BPU id(4) HzSElementwiseAdd 0.984450 20.0771 int8
ScatterND_414 CPU – ScatterND 0.987183 – float
2026-04-21 09:39:08,876 file: print_info_dict.py func: print_info_dict line No: 72 The quantized model output:

Output Cosine Similarity L1 Distance L2 Distance Chebyshev Distance

segmentation 0.987183 83.300630 0.490167 10008.679688
depth 0.999847 0.002232 0.000027 0.650759
2026-04-21 09:39:08,884 file: model_builder.py func: model_builder line No: 38 End to Horizon NN Model Convert.
2026-04-21 09:39:08,917 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 601 start convert to *.bin file…
2026-04-21 09:39:08,932 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4326 ONNX model output num : 2
2026-04-21 09:39:11,296 file: layout_util.py func: layout_util line No: 15 set_featuremap_layout start
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4060 model_deps_info: {‘hb_mapper_version’: ‘1.24.3’, ‘hbdk_version’: ‘3.49.15’, ‘hbdk_runtime_version’: ’ 3.15.55.0’, ‘horizon_nn_version’: ‘1.1.0’, ‘onnx_model’: ‘/open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx’, ‘march’: ‘bayes-e’, ‘layer_out_dump’: False, ‘log_level’: ‘DEBUG’, ‘working_dir’: ‘/open_explorer/test_lraspp_model_0420/hb_mapper_output_3/lraspp_99_torch110_3’, ‘model_prefix’: ‘lraspp_99_torch110_3’, ‘node_info’: {‘Conv_16’: {‘ON’: ‘CPU’}, ‘Conv_14’: {‘ON’: ‘CPU’}, ‘Conv_12’: {‘ON’: ‘CPU’}, ‘Conv_9’: {‘ON’: ‘CPU’}}, ‘input_names’: [‘input’], ‘input_type_rt’: [‘featuremap’], ‘input_space_and_range’: [‘regular’], ‘input_type_train’: [‘featuremap’], ‘input_layout_rt’: [‘NCHW’], ‘input_layout_train’: [‘NCHW’], ‘norm_type’: [‘no_preprocess’], ‘scale_value’: [‘’], ‘mean_value’: [‘’], ‘input_shape’: [‘1x5x360x640’], ‘input_batch’: [‘1’], ‘cal_dir’: [‘/open_explorer/test_lraspp_model_0420/hb_calibration_data_f32’], ‘cal_data_type’: [‘float32’], ‘preprocess_on’: False, ‘calibration_type’: ‘max’, ‘per_channel’: ‘True’, ‘max_percentile’: 0.9999, ‘hbdk_params’: {‘hbdk_pass_through_params’: '–O3 --core-num 1 --fast ', ‘input-source’: {‘input’: ‘ddr’, ‘_default_value’: ‘ddr’}}, ‘debug’: False, ‘compile_mode’: ‘latency’}
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4183 ############# model deps info #############
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4184 hb_mapper version : 1.24.3
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4187 hbdk version : 3.49.15
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4189 hbdk runtime version: 3.15.55.0
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4192 horizon_nn version : 1.1.0
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4196 ############# model_parameters info #############
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4202 onnx_model : /open_explorer/test_lraspp_model_0420/lraspp_99_torch110.onnx
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4203 BPU march : bayes-e
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4204 layer_out_dump : False
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4205 log_level : DEBUG
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4206 working dir : /open_explorer/test_lraspp_model_0420/hb_mapper_output_3/lraspp_99_torch110_3
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4207 output_model_file_prefix: lraspp_99_torch110_3
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4226 node info : {‘Conv_16’: {‘ON’: ‘CPU’}, ‘Conv_14’: {‘ON’: ‘CPU’}, ‘Conv_12’: {‘ON’: ‘CPU’}, ‘Conv_9’: {‘ON’: ‘CPU’}}
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4228 ############# input_parameters info #############
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4246 ------------------------------------------
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4248 ---------input info : input ---------
2026-04-21 09:39:11,296 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4249 input_name : input
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4250 input_type_rt : featuremap
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4252 input_space&range : regular
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4254 input_layout_rt : NCHW
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4255 input_type_train : featuremap
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4256 input_layout_train : NCHW
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4257 norm_type : no_preprocess
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4258 input_shape : 1x5x360x640
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4260 input_batch : 1
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4268 cal_data_dir : /open_explorer/test_lraspp_model_0420/hb_calibration_data_f32
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4270 cal_data_type : float32
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4271 ---------input info : input end -------
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4272 ------------------------------------------
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4274 ############# calibration_parameters info #############
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4275 preprocess_on : False
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4276 calibration_type: : max
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4281 max_percentile : 0.9999
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4284 per_channel : True
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4303 ############# compiler_parameters info #############
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4305 debug : False
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4307 compile_mode : latency
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4310 hbdk_pass_through_params: --O3 --core-num 1 --fast
2026-04-21 09:39:11,297 file: onnx2horizonrt.py func: onnx2horizonrt line No: 4310 input-source : {‘input’: ‘ddr’, ‘_default_value’: ‘ddr’}
2026-04-21 09:39:11,562 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 783 Convert to runtime bin file successfully!
2026-04-21 09:39:11,562 file: hb_mapper_makertbin.py func: hb_mapper_makertbin line No: 784 End Model Convert

进展分析

从你提供的最新日志看,精度已有明显提升:

输出 之前相似度 当前相似度 提升
segmentation 0.972476 0.987183 +1.5%
depth 0.999924 0.999847 持平

但 segmentation 仍未达到理想状态(建议 ≥0.99)。以下是针对性建议:


:red_circle: 关键问题定位

1. Resize 算子警告需重视

WARNING The output of Node(name:Resize_220, type:Resize) does not support data type: int16
WARNING The output of Node(name:Resize_220) is int8, then requantized to int16

影响:Resize_220 是 segmentation head 的上采样层,int8→int16 的二次量化会累积误差。

解决方案:将 Resize_220 及后续相关层强制 CPU 或 int16:

model_parameters:
  node_info:
    # 原有配置
    "Conv_16": {'ON': 'CPU'}
    "Conv_14": {'ON': 'CPU'}
    "Conv_12": {'ON': 'CPU'}
    "Conv_9": {'ON': 'CPU'}
    
    # 新增:segmentation head 关键层
    "Resize_220": {'ON': 'CPU'}
    "Resize_229": {'ON': 'CPU'}
    "ScatterND_337": {'ON': 'CPU'}
    "ScatterND_414": {'ON': 'CPU'}

2. ScatterND 算子数据类型不支持

WARNING The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int16
WARNING The input2 of Node(name:ScatterND_337, type:ScatterND) does not support data type: int8

原因:ScatterND 的第三个输入(updates)在量化时被错误量化,导致精度损失。

解决方案:ScatterND 必须运行在 CPU 上(你已配置),但需确保其输入不被量化:

model_parameters:
  node_info:
    # ScatterND 的输入节点也强制 CPU
    "Where_263_add": {'ON': 'CPU'}
    "Where_340_add": {'ON': 'CPU'}

3. 开启分层 Dump 定位偏差来源

当前 layer_out_dump: False,无法逐层对比。建议开启:

model_parameters:
  layer_out_dump: True  # 开启分层输出

然后用以下脚本对比 original_float_model.onnx 和 calibrated_model.onnx 的每一层输出:

import onnxruntime as ort
import numpy as np

# 加载测试数据
test_data = np.fromfile('test_sample.bin', dtype=np.float32).reshape(1, 5, 360, 640)

# 原始模型
sess_orig = ort.InferenceSession('lraspp_99_torch110_3_original_float_model.onnx')
orig_outputs = sess_orig.run(None, {'input': test_data})

# 标定后模型
sess_cal = ort.InferenceSession('lraspp_99_torch110_3_calibrated_model.onnx')
cal_outputs = sess_cal.run(None, {'input': test_data})

# 对比输出
for i, (o1, o2) in enumerate(zip(orig_outputs, cal_outputs)):
    diff = np.abs(o1 - o2)
    print(f'Output {i}:')
    print(f'  均值差:{np.abs(o1.mean() - o2.mean()):.6f}')
    print(f'  方差差:{np.abs(o1.var() - o2.var()):.6f}')
    print(f'  最大差:{diff.max():.6f}')
    print(f'  余弦相似度:{np.dot(o1.flatten(), o2.flatten()) / (np.linalg.norm(o1.flatten()) * np.linalg.norm(o2.flatten())):.6f}')

:clipboard: 推荐配置(最终版)

model_parameters:
  onnx_model: '../lraspp_99_torch110.onnx'
  march: 'bayes-e'
  output_model_file_prefix: 'lraspp_99_torch110_4'
  working_dir: '../hb_mapper_output_4/lraspp_99_torch110_4'
  layer_out_dump: True  # ← 开启分层调试

  node_info:
    # 低相似度 Conv 层
    "Conv_16": {'ON': 'CPU'}
    "Conv_14": {'ON': 'CPU'}
    "Conv_12": {'ON': 'CPU'}
    "Conv_9": {'ON': 'CPU'}
    
    # segmentation head 关键层
    "Resize_220": {'ON': 'CPU'}
    "Resize_229": {'ON': 'CPU'}
    "ScatterND_337": {'ON': 'CPU'}
    "ScatterND_414": {'ON': 'CPU'}
    
    # ScatterND 输入节点
    "Where_263_add": {'ON': 'CPU'}
    "Where_340_add": {'ON': 'CPU'}

input_parameters:
  input_name: 'input'
  input_type_train: 'featuremap'
  input_layout_train: 'NCHW'
  input_type_rt: 'featuremap'
  input_layout_rt: 'NCHW'
  input_shape: '1x5x360x640'
  input_batch: 1
  norm_type: 'no_preprocess'

calibration_parameters:
  cal_data_dir: '../hb_calibration_data_f32'
  cal_data_type: 'float32'
  preprocess_on: False
  calibration_type: 'max'
  per_channel: True
  max_percentile: 0.9999

compiler_parameters:
  compile_mode: 'latency'
  debug: False
  core_num: 1
  optimize_level: 'O3'
  input_source: {'input': 'ddr'}

:bullseye: 预期效果

按上述配置重新转换后,预期:

指标 当前 预期
segmentation 余弦相似度 0.987183 ≥0.995
depth 余弦相似度 0.999847 ≥0.999
均值/方差差值 较大 <1e-3

:pushpin: 后续步骤

  1. 应用上述配置,重新运行 hb_mapper_makertbin
  2. 对比 calibrated_model.onnx 的输出,确认均值/方差差值是否缩小
  3. 如果仍不理想:
    • 提供分层 Dump 的对比结果(哪一层开始偏差变大)
    • 考虑对 segmentation head 的 Conv 层强制 int16:
      "Conv_170": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}
      "Conv_171": {'ON': 'BPU', 'InputType': 'int16', 'OutputType': 'int16'}
      

期待你的反馈!:rocket:

目前发现一个新问题,部署.bin模型到开发板上之后,与*_quantized_model.onnx的模型输出对比,输出矩阵的 均值和方差 差别很大

目前发现一个新问题,部署转换后的.bin模型到开发板上,与*_quantized_model.onnx的模型输出对比,输出矩阵的 均值和方差 差别很大,这个怎么去排查?直接输入检验集其中的一个数据作为测试的,对比模型的输出结果

你好,精度调优可以参考算法工具链手册 精度debug 章节做一些尝试。定位到敏感算子

PTQ流程详解:6.1. PTQ转换原理及流程 — Horizon Open Explorer

精度调优:8.2. PTQ模型精度调优 — Horizon Open Explorer

性能调优:8.1. 模型性能调优 — Horizon Open Explorer

精度debug工具详解:6.2.12. 精度debug工具 — Horizon Open Explorer

我这边可以给一些方向来协助排查

经过分析疑点主要为:
日志显示 ScatterND_337 和 ScatterND_414 被放置在 CPU 上运行,且其前置的 Equal 算子也是 float 类型。如果这些算子用于生成语义分割的 Mask 或索引,CPU 与 BPU 之间的数据交互(Requantize/Dequantize)以及浮点/定点转换极易引入误差。
深度信息通常经过 Sigmoid 归一化到 [0,1],分布均匀,量化友好;而语义分割如果是 Logits 输出(未做 Softmax)或 One-hot 编码后的稀疏矩阵,其数值分布极不均匀,直接 INT8 量化会导致大量信息丢失。
日志中 find illegal threshold in Add_258... 表明某些层的激活值分布极端,导致自动计算的 Scale 失效,使用了默认值,这会直接破坏后续层的精度。

max 模式对离群点非常敏感,容易导致 Scale 过大,量化噪声增加。 建议选用别的精度校准方式

0.9999 几乎等同于 Max。尝试改为 0.999 或 0.99,牺牲少量动态范围以换取更小的量化步长,从而减小舍入误差。

你好跟换新python 接口应该解决了问题,定位为原始easy dnn对featuremap支持问题