专栏算法工具链yolov8 compile出现问题,输入shape是(1,64,640,640),但是要求是(1,4,16,8400)

yolov8 compile出现问题,输入shape是(1,64,640,640),但是要求是(1,4,16,8400)

解答中
zyh2026-04-14
21
1
J6v3.7.0 yolov8 compile出现问题,输入shape是(1,64,640,640),但是要求是(1,4,16,8400)
运行 hb_compile --config compile.yaml报错:

2026-04-14 16:08:17.222172067 [E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running Reshape node. Name:'/model.22/dfl/Reshape' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:45 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1,64,67200}, requested shape:{1,4,16,8400}

AI说是导出 ONNX 的时候 带了 YOLOv8 的 Detect 层 / DFL 层这些层地平线芯片不支持,必须 纯推理模型(只有特征图,不带后处理) 才能转 hbm;导出 ONNX 时用了 NMS;导出成了“检测+后处理一体”。
附件:
算法工具链
技术深度解析社区活动征程6
评论1
0/1000
  • YCJ
    Lv.4

    这个是工具链在校准的时候尝试8 batch校准失败报的错,对后续的量化过程没有影响。工具链在校准的时候首先会尝试8 batch校准,如果模型无法8 batch推理会退回到单batch校准模型。

    2026-04-14
    0
    0