How to solve Hailo Parser Error?

Hello,

i got an error during model converting

ValueError: cannot reshape array of size 7296 into shape (38,192,12,1)

hailo parser onnx my_model.onnx

So, I’ve tried several things to solve this problem.

In conclusion, I was able to move on to the next step by setting the end-node just above the point where the error occurred through node setting.

then i have a question here.

How does this node setting affect my model later in the process of parsing ?

Layers outside of the start and end-nodes are excluded from the model conversion. Their functions need to be implemented on the host.

1 Like

Hi, @klausk

Thanks for your help

Then, i have two question

  1. If i set the start and end-nodes, is it different result from my original model ?

  2. How can i solve this problem ? ( reshape error )

Yes. That is why you need to implement the functions on the host. Otherwise the computation is incomplete.

Frameworks like Pytorch have not been specifically developed for AI accelerators but for CPUs and GPUs. So, they can describe operators that are better run on a CPU. They are usually at the beginning and end of the network. We call it pre- and post-processing. And for popular networks we provide it as part of our examples or even add it back during model conversion e.g. NMS for the YOLO models.
For your own models you will need to do this yourself. It is some extra work but in return you get a much more efficient execution of your model compared to running the model on a CPU or GPU.

If my math is right your array seems to be a bit small to create the shape. 38 x 192 = 7296. So 12 x missing.