How to avoid losing precision in model transformation

When converting a model, 1_ quantize_ model.sh File needs to be modified

–quantized-dtype dynamic_ fixed_ point-8

Is this step to convert the float type of the model to int type?

Change to

–quantized-dtype dynamic_ fixed_ point-16

  • Can this improve the accuracy of the model?

  • After this operation, the model transformation is correct, but the target can not be detected during the detection.

  • How to transform the model with higher precision, such as not using int type, using float type?

Thank you for your information

1 Like

There is not much difference between int 8 and int 16… it is recommended to use int 8.

Also the NPU as far as I know doesn’t support float… It only supports int…

What is your target that is to be detected…? Maybe you could try some other model that is optimized… Like mobilenet ssd V2.

Also there is something known as “Quantization aware training” which is known to preserve accuracy more than conversion. But it is only supported on TF v2.0 and above… I don’t think we can use those models in VIM3 NPU at the moment

1 Like