yolo11n-seg quantization precision_mode=a16_w16 gives UINT8 for some output layers

Hi,

I am training yolo11n-seg with single label dust with the following command

yolo segment train
model=yolo11n-seg.pt
data=/path/to/dust.yaml
imgsz=640
epochs=150
batch=16
patience=30
seed=42
device=0
name=yolo11n_dust_640

*path: /path/to/dust
train: images/train
val: images/val
names:
0: dust
*
postprocessor used hailo-apps/hailo_apps/cpp/instance_segmentation/instance_seg_postprocess.cpp at 29acd11a8e641b2b61c3df45c95c97a775878e9f · hailo-ai/hailo-apps · GitHub

Its been observed quite a lot accuracy loss with INT8 quantization and hence precision_mode=a16_w16 is used with level=2 and compression=0 to improve the accuracy loss from the FP32 HAR/ONNX model bin. Note: level=3 and 4 are not supported with precision_mode=a16_w16.

Here is my model script yolov11n_dust_seg_calib.alls

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv60, sigmoid)
change_output_activation(conv74, sigmoid)
change_output_activation(conv92, sigmoid)
quantization_param({conv*}, precision_mode=a16_w16)
quantization_param([dw1, dw2, dw3, dw4, dw5, dw6, dw7], precision_mode=a16_w16)
pre_quantization_optimization(
activation_clipping,
layers=[conv60, conv74, conv92],
mode=percentile,
clipping_values=[0.001, 99.999]
)
shortcut1 = shortcut(matmul1, [reduce_max_softmax1, ew_sub_softmax1])
allocator_param(automatic_reshapes=disabled)
model_optimization_flavor(optimization_level=2, compression_level=0, batch_size=1)
model_optimization_config(calibration, batch_size=8, calibset_size=7350)

Following two highlighted layers conv88 and conv89 for the 20x20 boxes, are coming as UINT8 in HEF. This seems to be a bug in the compiler as I have checked the same in FP32 HAR and Quantized HAR after loading and those layers seems to be ok as UINT16.

hailortcli parse-hef yolov11n_seg.hef
Architecture HEF was compiled for: HAILO8
Network group name: yolov11n_seg, Multi Context - Number of contexts: 4
Network name: yolov11n_seg/yolov11n_seg
VStream infos:
Input yolov11n_seg/input_layer1 UINT8, NHWC(640x640x3)
Output yolov11n_seg/conv88 UINT8, NHWC(20x20x64) ======> UINT8..why???
Output yolov11n_seg/conv92 UINT16, NHWC(20x20x1)
Output yolov11n_seg/conv89 UINT8, NHWC(20x20x32)=======>UINT8..why???
Output yolov11n_seg/conv70 UINT16, NHWC(40x40x64)
Output yolov11n_seg/conv74 UINT16, NHWC(40x40x1)
Output yolov11n_seg/conv71 UINT16, NHWC(40x40x32)
Output yolov11n_seg/conv54 UINT16, NHWC(80x80x64)
Output yolov11n_seg/conv60 UINT16, NHWC(80x80x1)
Output yolov11n_seg/conv55 UINT16, NHWC(80x80x32)
Output yolov11n_seg/conv57 UINT16, NHWC(160x160x32)

anyway in order to handle those two layers as UINT8 and rest as UNIT16, I made a patch in the postprocessor code -

*float dequantize_value(uint8_t val, float32_t qp_scale, float32_t qp_zp){
xt::xarray<uint16_t> get_xtensor_uint16_or_convert(HailoTensorPtr tensor)
{
if (tensor->vstream_info().format.type == HAILO_FORMAT_TYPE_UINT16) {
return common::get_xtensor_uint16(tensor);
}

if (tensor->vstream_info().format.type == HAILO_FORMAT_TYPE_UINT8) {
return xt::cast<uint16_t>(common::get_xtensor(tensor));
}

throw std::runtime_error("Unsupported output tensor datatype");

}*

But the result of all the box decoding is 0 as it seems HEF bin file got corrupted.

After a lot of trial and error, result is improved once those two conv layers and corresponding output_layer are explicitly made as a8_w8

*quantization_param([conv88, conv89, output_layer9, output_layer10],
precision_mode=a8_w8
)
*
Please let me know why compiler makes wrong precision_mode only for those two output layers?

Hi, thanks for the detailed report.

In the DFC, output nodes (output_layer_X) have their own precision_mode, separate from the conv layers that feed them. The HEF output vstream type comes from the output layer node. Your script sets a16_w16 on {conv*} and dw1–dw7, but neither pattern matches the output layers, so their precision isn’t guaranteed. When you checked the HAR, conv88/conv89 were 16-bit, but please also check output_layer9 and output_layer10.

Please add an explicit setting for the outputs:

quantization_param({output_layer*}, precision_mode=a16_w16)

Then recompile and confirm with hailortcli parse-hef that all outputs report UINT16. If any output still comes out as UINT8, please share the optimization/compilation logs and the profiler report so we can look at it further.

About the all-zero boxes: the HEF is most likely fine. Each output has its own qp_scale/qp_zp. Casting UINT8 to UINT16 keeps the 8-bit codes without rescaling them, so dequantizing them as 16-bit values breaks the box decoding. A more robust option is to set the output format type to FLOAT32 in HailoRT. HailoRT will then dequantize each output with its own parameters, and the postprocess will work whatever the output bit width.

Your a8_w8 workaround works because it makes the output types consistent with what your decoder expects. With the outputs set explicitly to a16_w16, you should be able to keep 16-bit precision on the 20×20 heads too.

Thanks for the response.

I have tested it

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv60, sigmoid)
change_output_activation(conv74, sigmoid)
change_output_activation(conv92, sigmoid)

quantization_param({conv*}, precision_mode=a16_w16)
quantization_param([dw1, dw2, dw3, dw4, dw5, dw6, dw7], precision_mode=a16_w16)
quantization_param({conv*}, bias_mode=double_scale_initialization)
quantization_param({output_layer*}, precision_mode=a16_w16)

pre_quantization_optimization(
activation_clipping,
layers=[conv60, conv74, conv92],
mode=percentile,
clipping_values=[0.001, 99.999]
)

shortcut1 = shortcut(matmul1, [reduce_max_softmax1, ew_sub_softmax1])

allocator_param(automatic_reshapes=disabled)

model_optimization_flavor(optimization_level=2, compression_level=0, batch_size=1)

model_optimization_config(calibration, batch_size=8, calibset_size=7350)

Unfortunately it didn’t fix the issue. I have collected all the logs which is asked for. But upload option is not allowing me to upload a zip file. Its throwing error. How to get the access to upload

*Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, heic, heif, webp, avif, svg, jxl).
*

Hi, could you try a build that starts from the Model Zoo reference script for yolov11n_seg and adds 16-bit only on the outputs?

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv60, sigmoid)
change_output_activation(conv74, sigmoid)
change_output_activation(conv92, sigmoid)
quantization_param({output_layer*}, precision_mode=a16_w16)
allocator_param(automatic_reshapes=disabled)
model_optimization_flavor(optimization_level=2, compression_level=0)

Please share the parse-hef output and the accuracy you get compared with your FP32 model. If accuracy is still short, running hailo analyze-noise on that HAR will show which layers are actually sensitive. We can then raise precision on just those layers rather than the whole network. This also avoids the softmax shortcut, which changes how the attention block computes.

Thanks for checking it out.

Tested with hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/yolov11n_seg.alls at 3f19ede8673c0d050bca24ea02dd6606d52f816c · hailo-ai/hailo_model_zoo · GitHub .

parse hef issue is resolved but accuracy is poor -

Architecture HEF was compiled for: HAILO8
Network group name: yolov11n_seg, Multi Context - Number of contexts: 3
Network name: yolov11n_seg/yolov11n_seg
VStream infos:
Input yolov11n_seg/input_layer1 UINT8, NHWC(640x640x3)
Output yolov11n_seg/conv88 UINT16, NHWC(20x20x64)
Output yolov11n_seg/conv92 UINT16, NHWC(20x20x1)
Output yolov11n_seg/conv89 UINT16, NHWC(20x20x32)
Output yolov11n_seg/conv70 UINT16, NHWC(40x40x64)
Output yolov11n_seg/conv74 UINT16, NHWC(40x40x1)
Output yolov11n_seg/conv71 UINT16, NHWC(40x40x32)
Output yolov11n_seg/conv54 UINT16, NHWC(80x80x64)
Output yolov11n_seg/conv60 UINT16, NHWC(80x80x1)
Output yolov11n_seg/conv55 UINT16, NHWC(80x80x32)
Output yolov11n_seg/conv57 UINT16, NHWC(160x160x32)

Pixel IoU: 49.63% → 21.00% (−28.63 pp)
Pixel precision: 65.06% → 66.44% (+1.37 pp)
Pixel recall: 67.67% → 23.50% (−44.17 pp)
Region precision: 56.85% → 61.08% (+4.23 pp)
Region recall: 32.39% → 10.03% (−22.36 pp)

Both modes failed:

--analyze-mode advanced
–analyze-mode simple

[info] No GPU chosen and no suitable GPU found, falling back to CPU.
[info] Current Time: 11:31:42, 11/09/26
[info] CPU: Architecture: x86_64, Model: AMD EPYC 74F3 24-Core Processor, Number Of Cores: 6, Utilization: 0.7%
[info] Memory: Total: 53GB, Available: 50GB
[info] System info: OS: Linux, Kernel: 6.8.0-1015-azure
[info] Hailo DFC Version: 3.34.0
[info] HailoRT Version: Not Installed
[info] PCIe: No Hailo PCIe device was found
[info] Running hailo analyze-noise /mnt/data3/dust/runs/yolo11n_seg_mzref_outputs_a16_no_softmax_batch1_retry1_20261109/yolov11n_seg.har --data-path /mnt/data3/dust/runs/yolo11n_seg_mzref_outputs_a16_no_softmax_batch1_retry1_20261109/noise_input_npy --batch-size 1 --data-count 128 --analyze-mode advanced
[info] Starting Layer Noise Analysis

Full Quant Analysis:   0%|          | 0/128 [00:00<?, ?iterations/s]Traceback (most recent call last):
File "/home/subnath/hailo_venv/bin/hailo", line 6, in 
sys.exit(main())
^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/cmd_utils/main.py", line 111, in main
ret_val = client_command_runner.run()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/cmd_utils/base_utils.py", line 68, in run
return self._run(argv)
^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/cmd_utils/base_utils.py", line 89, in _run
return args.func(args)
^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/hailo_lat_cli.py", line 60, in run
runner.analyze_noise(
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_common/states/states.py", line 16, in wrapped_func
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/runner/client_runner.py", line 2136, in analyze_noise
self.analyze_noise(
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_common/states/states.py", line 16, in wrapped_func
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/runner/client_runner.py", line 2158, in analyze_noise
return self.sdk_backend.run_layer_analysis_tool(data, data_count, batch_size, analyze_mode, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py", line 1114, in run_layer_analysis_tool
analyzer.run()
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/optimization_algorithm.py", line 55, in run
return super().run()
^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/algorithm_base.py", line 159, in run
self.run_int()
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/hailo_layer_noise_analysis.py", line 86, in run_int
self.analyze_full_quant_net()
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/hailo_layer_noise_analysis.py", line 217, in analyze_full_quant_net
predict_function(inputs)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/tmp/autograph_generated_fileexy7hrma.py", line 13, in tf__predict_function
retval = ag.converted_call(ag.ld(lat_model), (ag.ld(data),), dict(training=False), fscope)
^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler
raise e.with_traceback(filtered_tb) from None
^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 423, in call
metric.update_state(native, numeric, partial_numeric=partial_numeric)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 23, in update_state
self.noise_energy.assign_add(tf.reduce_mean((native - numeric) ** 2))
~^~~
ValueError: in user code:

File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/hailo_layer_noise_analysis.py", line 211, in predict_function  *
    return lat_model(data, training=False)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler  **
    raise e.with_traceback(filtered_tb) from None
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 423, in call
    metric.update_state(native, numeric, partial_numeric=partial_numeric)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 23, in update_state
    self.noise_energy.assign_add(tf.reduce_mean((native - numeric) ** 2))

ValueError: Exception encountered when calling LATModel.call().

e[1mDimensions must be equal, but are 64 and 66 for '{{node lat_model_1/sub_295}} = Sub[T=DT_FLOAT](lat_model_1/conv_feature_splitter6_2_1/act_op_1/Identity, lat_model_1/conv_feature_splitter6_2_3/output_op_1/mul)' with input shapes: [1,1,400,64], [1,1,400,66].e[0m

Arguments received by LATModel.call():
  • inputs=tf.Tensor(shape=(1, 640, 640, 3), dtype=float32)

Full Quant Analysis:   0%|          | 0/128 [00:29<?, ?iterations/s]

Thanks for running this so quickly. I know it’s been a long series of experiments, and I appreciate you sticking with it.

Good news first: all outputs now come out as UINT16, so the output precision issue is resolved with the reference script.

On the accuracy drop, the first thing to check is the optimization level. Your log shows that the DFC didn’t find a GPU on that machine. On a CPU-only setup, the DFC defaults to optimization level 0 (calibration only) unless the level is set explicitly. The reference script doesn’t set it. Level 0 alone can cause a large accuracy drop. Could you check your optimization log to confirm which level was applied?

If possible, please rerun the optimization on a machine with an NVIDIA GPU (driver 525 or later), with these lines added to the reference script:

model_optimization_flavor(optimization_level=2, compression_level=0)
model_optimization_config(calibration, calibset_size=512)

Your 7,350-image dataset covers the 1024-image minimum for level 2. For the calibration statistics step itself, around 512 images is enough; using the full set there mainly increases run time. A GPU will also make analyze-noise much faster.

The content of the calibration set matters as much as its size. It should represent the lighting, viewpoints, objects and backgrounds expected in production. More images help only when they represent the deployment domain. Out-of-domain images can reduce quantized accuracy and increase optimization time. If the quantized HEF loses accuracy compared with the original ONNX model, improve the calibration data first, before changing model or runtime settings.

If accuracy is still low after that, two more things are worth checking:

  1. Calibration preprocessing: the script includes normalization([0,0,0],[255,255,255]), so the calibration images should be raw 0–255 RGB with the same resize/letterbox as training, not pre-normalized to 0–1.
  2. Emulator comparison: evaluate the HAR in the emulator with InferenceContext.SDK_NATIVE, SDK_FP_OPTIMIZED and SDK_QUANTIZED. That shows whether the drop comes from preprocessing, quantization, or the on-device/postprocess side. For the on-device run, setting the output format to FLOAT32 in HailoRT lets it handle dequantization for every output.

About the analyze-noise error: that looks like an issue on our side with the 20×20 output branch when it’s set to 16-bit. We’ll look into it. Meanwhile, running it on a HAR built from the reference script without the {output_layer*} a16_w16 line should work. If you’re comfortable sharing that HAR by direct message, it would help us reproduce the error.

Thanks for the inputs.

  1. We reran the optimization on an NVIDIA GPU.

model script -

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv60, sigmoid)
change_output_activation(conv74, sigmoid)
change_output_activation(conv92, sigmoid)
quantization_param({output_layer*}, precision_mode=a16_w16)
allocator_param(automatic_reshapes=disabled)
model_optimization_flavor(optimization_level=2, compression_level=0, batch_size=1)
model_optimization_config(calibration, calibset_size=512)

Log snippet-

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1794278624.575632 100276 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1794278624.785896 100276 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
e[36m Start run for network yolov11n_seg ...e[0m
e[36m Initializing the hailo8 runner...e[0m
e[36m Preparing calibration data...e[0m
[info] Loading model script commands to yolov11n_seg from /mnt/data3/dust/runs/yolo11n_seg_mzref_outputs_a16_calib512_20261110/yolov11n_seg_mzref_outputs_a16_calib512.alls
[info] Found model with 3 input channels, using real RGB images for calibration instead of sampling random data.
[info] Starting Model Optimization
I0000 00:00:1794278653.287958 100276 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1528 MB memory: -> device: 0, name: NVIDIA A10-4Q, pci bus id: 0002:00:00.0, compute capability: 8.6
I0000 00:00:1794278655.331400 100276 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1528 MB memory: -> device: 0, name: NVIDIA A10-4Q, pci bus id: 0002:00:00.0, compute capability: 8.6
[info] Model received quantization params from the hn
I0000 00:00:1794278657.417700 100276 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1528 MB memory: -> device: 0, name: NVIDIA A10-4Q, pci bus id: 0002:00:00.0, compute capability: 8.6
I0000 00:00:1794278657.780459 100276 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1528 MB memory: -> device: 0, name: NVIDIA A10-4Q, pci bus id: 0002:00:00.0, compute capability: 8.6
[info] MatmulDecompose skipped
[info] Starting Mixed Precision
[info] Model Optimization Algorithm Mixed Precision is done (completion time is 00:00:00.87)
[info] LayerNorm Decomposition skipped
[info] Starting Statistics Collector
[info] Using dataset with 512 entries for calibration

The optimization log confirms GPU detection, 512 calibration entries, level-2 processing and Quantization-Aware Fine-Tuning.

The calibration images were selected from our 7,350-image mining-dust dataset. This is the same deployment domain as the production application and includes relevant dust conditions, mining backgrounds, viewpoints and lighting variations. No generic COCO or other out-of-domain images were used.

The images were supplied as raw RGB values in the 0–255 range. They were not pre-normalized. The following normalization remained inside the model script:

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]).

We used calibset_size=512 as recommended to reduce calibration-statistics runtime. It was not selected as an outlier-free or accuracy-optimized subset. Previous experiments with 512 versus the larger calibration set showed little accuracy difference, so calibration-set size does not appear to be the primary cause of the remaining quantization gap.

We evaluated the resulting HAR on a separate matched set of 1,059 dust-domain images. After level-2 optimization using 512 domain-specific calibration images, a quantization-related accuracy gap remained.

SDK_NATIVE and SDK_FP_OPTIMIZED produced effectively identical results, confirming that preprocessing and floating-point model translation were correct.

However, SDK_QUANTIZED still showed a recall loss:

SDK_FP_OPTIMIZED: Pixel recall: 67.77% Pixel IoU: 49.68% Region recall: 32.65%SDK_QUANTIZED: Pixel recall: 56.94% Pixel IoU: 45.21% Region recall: 27.06%

2)We have run analyze-noise both on advanced as well as simple mode with the following model script .alls

*normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv60, sigmoid)
change_output_activation(conv74, sigmoid)
change_output_activation(conv92, sigmoid)
allocator_param(automatic_reshapes=disabled)
model_optimization_flavor(optimization_level=2, compression_level=0, batch_size=1)
model_optimization_config(calibration, calibset_size=512)
model_optimization_config(
checker_cfg,
policy=enabled,
dataset_size=16,
batch_size=1,
analyze_mode=advanced
)
*
same issue -

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1794335183.602539 1436183 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1794335183.606771 1436183 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
[info] Current Time: 18:26:27, 11/10/26
[info] CPU: Architecture: x86_64, Model: AMD EPYC 74F3 24-Core Processor, Number Of Cores: 6, Utilization: 0.8%
[info] Memory: Total: 53GB, Available: 51GB
[info] System info: OS: Linux, Kernel: 6.8.0-1015-azure
[info] Hailo DFC Version: 3.34.0
[info] HailoRT Version: Not Installed
[info] PCIe: No Hailo PCIe device was found
[info] Running hailo analyze-noise /mnt/data3/dust/runs/yolo11n_seg_mzref_no_a16_calib512_noise_20261110/yolov11n_seg.har --data-path /mnt/data3/dust/runs/yolo11n_seg_mzref_outputs_a16_no_softmax_batch1_retry1_20261109/noise_input_npy --batch-size 1 --data-count 128 --analyze-mode advanced
I0000 00:00:1794335194.289731 1436183 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1528 MB memory:  -> device: 0, name: NVIDIA A10-4Q, pci bus id: 0002:00:00.0, compute capability: 8.6
[info] Starting Layer Noise Analysis

Full Quant Analysis:   0%|          | 0/128 [00:00<?, ?iterations/s]Traceback (most recent call last):
File "/home/subnath/hailo_venv/bin/hailo", line 6, in 
sys.exit(main())
^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/cmd_utils/main.py", line 111, in main
ret_val = client_command_runner.run()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/cmd_utils/base_utils.py", line 68, in run
return self._run(argv)
^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/cmd_utils/base_utils.py", line 89, in _run
return args.func(args)
^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/tools/hailo_lat_cli.py", line 60, in run
runner.analyze_noise(
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_common/states/states.py", line 16, in wrapped_func
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/runner/client_runner.py", line 2136, in analyze_noise
self.analyze_noise(
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_common/states/states.py", line 16, in wrapped_func
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/runner/client_runner.py", line 2158, in analyze_noise
return self.sdk_backend.run_layer_analysis_tool(data, data_count, batch_size, analyze_mode, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py", line 1114, in run_layer_analysis_tool
analyzer.run()
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/optimization_algorithm.py", line 55, in run
return super().run()
^^^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/algorithm_base.py", line 159, in run
self.run_int()
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/hailo_layer_noise_analysis.py", line 86, in run_int
self.analyze_full_quant_net()
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/hailo_layer_noise_analysis.py", line 217, in analyze_full_quant_net
predict_function(inputs)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/mnt/data3/dust/runs/yolo11n_seg_mzref_no_a16_calib512_noise_20261110/tmp/autograph_generated_filebkc2tu2f.py", line 13, in tf__predict_function
retval = ag.converted_call(ag.ld(lat_model), (ag.ld(data),), dict(training=False), fscope)
^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler
raise e.with_traceback(filtered_tb) from None
^^^^^^^^^^^
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 423, in call
metric.update_state(native, numeric, partial_numeric=partial_numeric)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 23, in update_state
self.noise_energy.assign_add(tf.reduce_mean((native - numeric) ** 2))
~^~~
ValueError: in user code:

File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/hailo_layer_noise_analysis.py", line 211, in predict_function  *
    return lat_model(data, training=False)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler  **
    raise e.with_traceback(filtered_tb) from None
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 423, in call
    metric.update_state(native, numeric, partial_numeric=partial_numeric)
File "/home/subnath/hailo_venv/lib/python3.12/site-packages/hailo_model_optimization/algorithms/lat_utils/lat_model.py", line 23, in update_state
    self.noise_energy.assign_add(tf.reduce_mean((native - numeric) ** 2))

ValueError: Exception encountered when calling LATModel.call().

e[1mDimensions must be equal, but are 64 and 66 for '{{node lat_model_1/sub_295}} = Sub[T=DT_FLOAT](lat_model_1/conv_feature_splitter6_2_1/act_op_1/Identity, lat_model_1/conv_feature_splitter6_2_3/output_op_1/mul)' with input shapes: [1,1,400,64], [1,1,400,66].e[0m

Arguments received by LATModel.call():
  • inputs=tf.Tensor(shape=(1, 640, 640, 3), dtype=float32)

Full Quant Analysis:   0%|          | 0/128 [00:52<?, ?iterations/s]