Converts a real value to the nearest quantized value, without clamping it to the tensor type's range.
int quantize(double value) => (value / scale).round() + zeroPoint;