Precision mode conflict error

Hi Hailo

I got some error while compiling and the error messages as follows :

BackendAllocatorException: Compilation failed: Precision mode conflict between demux_conv101_d5_sdc_conv101_d4_sdc_to_extension-shortcut_from_context_5_to_context_7_in_133_to_concat_from_conv10 (precision_mode=A8_W8, supported_transitions=MODE_8_TO_8) to extension-shortcut_from_context_5_to_context_7_in_133_to_concat_from_conv101_d3-5_to_conv101_dc (precision_mode=A16_W16, supported_transitions=MODE_16_TO_16)

the model script that I used are as follows :

normalization1 = normalization([0.0,0.0,0.0], [255.0,255.0,255.0]) model_optimization_flavor(optimization_level=0,compression_level=0,batch_size=4)
model_optimization_config(compression_params, auto_16bit_weights_ratio=1)

Could you let me know the next step to clear this error ?

BR

Hi @roiyim,
Please try to remove that line:

Hi Nadav,

Thank you for your fast reply

Yes, the error is resolved when I don’t use 16-bit quantization.
However, I used 16-bit quantization to improve the SNR.
When I use the default 8-bit quantization, the output layer SNR is below 10.
By changing from 8-bit to 16-bit, the SNR looks fine.

I taught that 16-bit quantization was the easiest way to verify the model performance. Using this 16bit quantization to determine whether it operates at the highest performance.

Then follow the Accuracy Analysis Tool is the only way to improve SNR issues ?

BR

16b is definitely an important tool in improving accuracy, but it has some limitations, and we also have additional tools that could be a better fit on certain situations.

Yes, I would start with applying to 16b only on the output layer. This is ok on most of the cases (unless applying NMS on the output)

Then, the Layer Analysis Tool is a good step, trying to identify what are the layers that induce the error (i.e. has low SNR), and try to understands what is the pathology of that error (e.g. extreme values, split values)

1 Like