quark.onnx.tools.convert_resize_fs_to_pof2s

quark.onnx.tools.convert_resize_fs_to_pof2s#

Module Contents#

Functions#

quark.onnx.tools.convert_resize_fs_to_pof2s.scale2pos(scale: float) int#

Obtain the fixed-point position corresponding to the scale. To avoid generating infinity during computations, the range of scale is limited. :param scale: the scale :return: the fixed-point position

quark.onnx.tools.convert_resize_fs_to_pof2s.pos2scale(pos: int) float#

Obtain the scale corresponding to the fixed-point position. :param scale: the fixed-point position :return: the scale