多batch模型编译

如题,当我使用yolo11的readme,按照每个步骤执行之后
在以下配置文件中开启input batch就会编译失败,多batch模型的编译请问在哪里能参考

model_parameters:
  onnx_model: './yolo11n.onnx'
  march: "bayes-e"
  layer_out_dump: False
  working_dir: 'bin_dir/yolo11n_detect_bayese_640x640_nv12'
  output_model_file_prefix: 'yolo11n_detect_bayese_640x640_nv12'
  # YOLO11 n, s, m
  node_info: {"/model.10/m/m.0/attn/Softmax": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'}}
  # YOLO11 l, x
  # node_info: {"/model.10/m/m.0/attn/Softmax": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'},
  #             "/model.10/m/m.1/attn/Softmax": {'ON': 'BPU','InputType': 'int16','OutputType': 'int16'}}
input_parameters:
  # input_batch: 8
  input_name: ""
  input_type_rt: 'nv12'
  input_type_train: 'rgb'
  input_layout_train: 'NCHW'
  norm_type: 'data_scale'
  scale_value: 0.003921568627451
calibration_parameters:
  cal_data_dir: './calibration_data_rgb_f32_640'
  cal_data_type: 'float32'
compiler_parameters:
  compile_mode: 'latency'
  debug: False
  optimize_level: 'O3'

带Transformer结构的模型一般不能在工具链直接改Batch,需要自己准备多Batch的ONNX模型。

您好,有参考吗,我之前指定batch为4导出onnx之后使用工具链还是会报错,报错信息是batch该维度只能为1

这块没有参考了,只能单batch模型多次调用推理

好的大佬,目前我是按照了batch推理这里,输入为2 * 3 * 640 * 640,然后得到了

n_dim: 4 2 80 80 80
n_dim: 4 2 80 80 64
n_dim: 4 2 40 40 80
n_dim: 4 2 40 40 64
n_dim: 4 2 20 20 80
n_dim: 4 2 20 20 64

请问大佬,这里batch推理yolo的输出该怎么解析呢,推理框架是否支持拆分成2个1 * 80 * 80 * 80然后放到decode_box解析呢


如果不支持的话是我只能自己再试下了,现在也不知道batch推理的结果