Model parsing error (ReduceMean, Unsqueeze)

Hi everyone,

I am currently trying to run inference on a custom model with Hailo8. When I attempt to parse the model’s ONNX file using Hailo’s Data Flow Compiler, I encounter the following unsupported layer error.the version of the Data Flow Compiler is 2024_04.

UnexpectedNodeError in op /Unsqueeze_1: Unexpected node /Unsqueeze_1 (Unsqueeze)
UnsupportedReduceMeanLayerError in op /_attention/layer_norm/ReduceMean: Reduce mean layer /_attention/layer_norm/ReduceMean has unsupported axis -1 (must be over one spatial dimension only).
UnsupportedReduceMeanLayerError in op /_mlp/layer_norm/ReduceMean: Reduce mean layer /_mlp/layer_norm/ReduceMean has unsupported axis 2 (must be over one spatial dimension only).
UnsupportedReduceMeanLayerError in op /_attention/layer_norm/ReduceMean_1: Reduce mean layer /_attention/layer_norm/ReduceMean_1 has unsupported axis 2 (must be over one spatial dimension only).
UnsupportedReduceMeanLayerError in op /_mlp/layer_norm/ReduceMean_1: Reduce mean layer /_mlp/layer_norm/ReduceMean_1 has unsupported axis 2 (must be over one spatial dimension only).
UnsupportedFeatureSplitterLayerError in op /_attention/Split: Feature splitter vertex /_attention/Split is splitting input over unsupported axis 2
UnexpectedNodeError in op /Unsqueeze: Unexpected node /Unsqueeze (Unsqueeze)

However, according to the Data Flow Compiler user guide, both the ReduceMean and Unsqueezed layers are supposed to be supported.

Why am I getting the unsupported layer error?

It will be hard getting to the bottom of just feom that. Maybe it will be more efficient to open a support ticket, with attached onnx.

unsuqeezed layer can used only in specific cases such as
between Dense and Conv layers.

The manual says that Average Pooling(Reduce Mean) works fine, but sometimes it doesn’t work for unknown reasons.

I suggest some solutions.

First, update DFC and HRT newest verstion
Second, Translate from TFLite or TF to hef instead of onnx.
Last, Converts unsupported layers from hailo to supported layers.

Thanks.

Are you using openpilot’s supercombo.onnx model? I got the same errors.

1 Like

Hi,
From some point in the model, the dimensions are reduced to 3, which is a problem:
image
Been able to parse (after simplifier) up untli there:
hailo parser onnx supercombo-sim.onnx --end-node-names Conv_200 --start-node-names Conv_0

Yes, I am using the supercombo.onnx model.
As you pointed out, I was able to compile the model and perform inference up to a certain point. However, if possible, I would prefer to run the entire supercombo.onnx model, including the final layers, on Hailo8.

1 Like