Lines Matching defs:scale
61 // point is derived from the shifted range, and the scale isn't changed. As
64 // TODO: we should nudge the scale as well, but that requires the
65 // fake quant op used in the training to use the nudged scale as well.
67 double rmax, double &scale,
69 // Determine the scale.
72 scale = (rmax - rmin) / (qmaxDouble - qminDouble);
81 const double zeroPointFromMin = qminDouble - rmin / scale;
83 std::abs(qminDouble) + std::abs(rmin / scale);
84 const double zeroPointFromMax = qmaxDouble - rmax / scale;
86 std::abs(qmaxDouble) + std::abs(rmax / scale);
123 // 0.0s, so the scale is set to 1.0 and the tensor can be quantized to zero
130 double scale;
132 getNudgedScaleAndZeroPoint(qmin, qmax, rmin, rmax, scale, nudgedZeroPoint);
135 expressedType, scale, nudgedZeroPoint,
173 double scale;
175 getNudgedScaleAndZeroPoint(qmin, qmax, rmin, rmax, scale, nudgedZeroPoint);
176 scales.push_back(scale);