Running hailomz optimize reports layer yolov8n/conv41 doesn't have one output layer

Thanks @victorc, this got me further. After making the recommended changes I then re-ran:
hailomz parse --hw-arch hailo8l --ckpt best.onnx yolov8n --end-node-names /model.22/cv3.0/cv3.0.2/Conv /model.22/cv2.0/cv2.0.2/Conv /model.22/cv2.1/cv2.1.2/Conv /model.22/cv3.1/cv3.1.2/Conv /model.22/cv3.2/cv3.2.2/Conv /model.22/cv2.2/cv2.2.2/Conv
That created a new yolov8n.har file
Now when I run:
hailomz optimize --hw-arch hailo8l --har ./yolov8n.har --calib-path /home/mytest/.hailomz/data/models_files/coco/2023-08-03/coco_calib2017.tfrecord
–model-script /home/mytest/Hailo8l/hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/yolov8n.alls
yolov8n
I got the following error:
NegativeSlopeExponentNonFixable(
hailo_model_optimization.acceleras.utils.acceleras_exceptions.NegativeSlopeExponentNonFixable: Quantization failed in layer yolov8n/conv42 due to unsupported required slope. Desired shift is 9.0, but op has only 8 data bits. This error raises when the data or weight range are not balanced. Mostly happens when using random calibration-set/weights, the calibration-set is not normalized properly or batch-normalization was not used during training.
To recap, I’m just following the original tutorial, thus not adding any of my own changes, just those suggested in this thread.
However, per this article: Problem With Model Optimization - #24 by emasty I modified the yolov8n.alls file further as:
normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv42, sigmoid)
change_output_activation(conv53, sigmoid)
change_output_activation(conv63, sigmoid)
nms_postprocess(meta_arch=yolov8, engine=cpu)
allocator_param(width_splitter_defuse=disabled)
quantization_param([conv42, conv53, conv63], force_range_out=[0.0, 1.0])
I can now optimize and compile, but have not tested. Of course this may simply be patching a root cause. A guess on my part might be related to how the tutorial presents its initial training. However I’m still a newbie, so lots more for me to learn. I have not tested the compiled model yet.