Flatten layer not recognized from Data Compiler

I want to parse a custom onnx model with Data Compiler 3.30 in order to have a compatible hef file for hailort 4.20 for hailo8l.
I am encountering problems with a flatten layer that requires changing the output nodes varying the expected output of my model because the operation is not supported:

[info] Simplified ONNX model for a parsing retry attempt (completion time: 00:00:02.70)
Parsing failed with recommendations for end node names: ['/Concat', '/Concat_2', '/analyze_cls_feat.1/norm.1/BatchNormalization', '/Concat_1', '/analyze_cls_feat.0/norm.0/BatchNormalization', '/analyze_cls_feat.2/norm.2/BatchNormalization'].
Would you like to parse again with the recommendation? (y/n) 
n
Traceback (most recent call last):
  File "/local/workspace/hailo_virtualenv/bin/hailo", line 8, in <module>
    sys.exit(main())
  File "/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/tools/cmd_utils/main.py", line 111, in main
    ret_val = client_command_runner.run()
  File "/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_platform/tools/hailocli/main.py", line 64, in run
    ret_val = self._run(argv)
  File "/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_platform/tools/hailocli/main.py", line 111, in _run
    return args.func(args)
  File "/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/tools/parser_cli.py", line 223, in run
    return self._handle_recommendation_exception(err, args, net_name, tensor_shapes, command, save_model)
  File "/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/tools/parser_cli.py", line 250, in _handle_recommendation_exception
    raise ParsingWithRecommendationCLIException(
hailo_sdk_client.tools.parser_cli.ParsingWithRecommendationCLIException: Parsing failed. The errors found in the graph are:
 UnsupportedShuffleLayerError in op /analyze_cls_feat.0/flatten/Flatten: Failed to determine type of layer to create in node /analyze_cls_feat.0/flatten/Flatten

The same model was correctly parsed and compiled with Data Compiler version 3.28 for hailort version 4.18.
Are there any suggestions on how to proceed?

Hey @Federico_Pantanella ,

Welcome to the Hailo Community!

It’s possible that the parsing step changed the Flatten layer to Reshape in a previous version and has stopped doing so in the current version, as they are functionally equivalent.

To resolve the issue you’re facing, you have two options:

  1. Convert every Flatten node in the ONNX model to Reshape. This modification should allow the model to work as expected.

  2. Try using your older model. The HEF compiled with DFC 3.28 should be compatible with hailort 4.20.

Let me know if you have any other questions! We’re here to help.

the model compiled with DFC 3.28 actually works with the newer drivers version.
Will all the hailort drivers be compatible with previous DFC versions