Onnx to .har model converstion parse error

Hello everyone in the community,

I am training a point cloud classification model using PyTorch. I want to run this custom model on the Hailo8L AI kit, so I am trying to convert it to ONNX format. However, when I attempt to convert the ONNX model to Hailo’s HAR format, I encounter the following error:

Parsing failed with recommendations for end node names: ['/Relu_1']

I am using the following code to convert my PyTorch model to ONNX:

import torch
import onnx
from model_utils import PointCloudModel  

model_path = "Training_results_5/Training_results_5_model.pth"
model = PointCloudModel()

inp = [torch.randn((1, 3, 64), requires_grad=False)]
model(*inp)
onnx_path = 'small_example.onnx'

torch.onnx.dynamo_export(model, tuple(inp), onnx_path,
                  export_params=True,
                  training=torch.onnx.TrainingMode.PRESERVE,
                  do_constant_folding=False,
                  opset_version=13)

I have tried different conversion methods, but I still encounter various errors. Could you help me understand the cause of this issue and how to resolve it?

Best regards

Hi @onur,

Welcome to the Hailo Community!

This recommendation is given when the model contains unsupported operations. In this case, it means that there are certain operations after ‘relu_1’ that aren’t supported on the device.

If at the end of the model, these operations can be performed on the host as a post-process. You can check where it is located by opening the model in netron.app