I have three question on “Entropy Calibration - pseudocode”
Question 1: The first step in the pseudo code is to form 2048 bins. My understanding is: first collect all the activation values of a layer (500~100 images), then find |max| in the activation values, and then output the histogram of all activation values, the interval of the histogram is |max|/2048 (single width of bins). Is this correct?
Question 2: " candidate_distribution_Q = quantize [ bin[ 0 ], …, bin[ i-1 ] ] into 128 levels",My understanding of this line of pseudo code is: The first finding the activation value |T| corresponding to bin[i-1] , then used it as a threshold, and then Multiply all the activation values corresponding to [ bin[ 0 ], …, bin[ i-1 ] ] by 128/|T|, and then re-statistic the histogram distribution of quantized activation value, Is this correct?
Question 3: “expand candidate_distribution_Q to ‘ i ’ bins”, how to understand this line of code? Can you give an example? For example: when i = 141, how can I expand Q[0~127] to Q’[0~141]?
Thank yous