Skip to content
DeepForgeby svx
All problems
EasyDeep Learningdl-338

Min-Max Calibration Range

Problem

Return the calibration range of observed activations as [min, max]; an empty list returns [0.0, 0.0]. These bounds feed the step size and zero point of min-max quantization.

The signature is min_max_calibration_range(values).

Hint

Min-max calibration is sensitive to a single extreme outlier.

Test cases

case 1
in: [[3,-2,4]]
expected: [-2,4]
case 2
in: [[1.5]]
expected: [1.5,1.5]
case 3
in: [[0,0,0]]
expected: [0,0]
case 4
in: [[]]
expected: [0,0]
Starter codePython
def min_max_calibration_range(values):
    # Your code here
    pass

4 test cases · run your code against them in the editor