Custom PyTorch Model ONNX

Hello, I have a custom PyTorch model exported with ONNX opset 11 with a sigmoid output.

However, when I am optimizing the model (finetune) with the latest version of Dataflow compiler, I am getting a very large dstill loss on the conv46_ne_activation layer instead of conv46 as the output layer. May I know the reason for this?

Thanks.

Hi @zijian.loon,
Can you share the commands that you’ve used for hailo? Also how many images are used on the FT?

Hello, I have solved the issue. The problem was not normalizing my images before optimization process.

Thanks.

Can you share how did you overcome this problem?

You need to normalize your input images during preprocessing (dividing by 255 for example) before running the .optimize() command

or

enable hardware normalization by including “normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])\n” in the alls script before running the .optimize() command

1 Like

How where you able to run your custom model on Hailo, can you share the code of how you integrated the accelerator ? Please.