9 virtual TensorQuantizationParams ChooseQuantizationParams(
11 bool preserve_sparsity =
false,
12 int precision = 8) = 0;
28 TensorQuantizationParams NonlinearQuantizationParamsSearch(
30 bool preserve_sparsity =
false,
33 TensorQuantizationParams ChooseQuantizationParams(
35 bool preserve_sparsity =
false,
36 int precision = 8)
override;
49 TensorQuantizationParams ChooseQuantizationParams(
51 bool preserve_sparsity =
true,
52 int precision = 8)
override;
bin_width = (max - min)/nbins ith bin (zero-based indexing) contains [i*bin_width, (i+1)*bin_width) with an exception that (nbins - 1)th bin contains [(nbins-1)*bin_width, nbins*bin_width]