Error: input elem num(408000) reshaped elem num(102000)

An error is reported when running the Tengine demo on rv1126,

Error: input elem num(408000) != reshaped elem num(102000)
Tengine FATAL: Infer node(id: 276, op: Reshape) shape failed.
Tengine: Infer shape of graph failed(-1).
Prerun multithread graph failed.

The command used is

./build/install/bin/tm_yolov5s -m models/yolov5s.tmfile -i images/ssd_dog.jpg -r 1 -t 1

After searching, the reason is that there is the following code in the code tm_yolov5s.cpp

There is no focus layer in version 6 of yolov5. The focus layer is replaced by convolution (the focus layer is not supported by some hardware), and the model here is not the version 6 version.

Change #define YOLOV5_VERSION6 1 to #define YOLOV5_VERSION6 0.

Guess you like

Origin blog.csdn.net/u013171226/article/details/122982661