Hi @Vasiliy_Kuznetsov,
For quant() layer yes I managed to figure out the formula and it is fine to apply.
For the weights of convolution layer, it goes the same formula to calculate int_repr() values from float with scale and zero_point.
The purpose of quantization is to have parameters in integer and hence reduce computation cost during convolution. If we couldn’t produce the same result with plain network with these weights, it seems the task to port successfully to C model is not feasible, or at least, not well-supported by Pytorch currently.
Cheers,
Giang