megengine.core.tensor.dtype.quint4

quint4(scale, zero_point)[源代码]

Consturct a quantized unsigned int4 data type with scale (float) and zero_point (uint8). The real value represented by a quint4 data type is float_val = scale * (uint4_val - zero_point)