mindspore.QuantDtype

View Source On Gitee
class mindspore.QuantDtype[source]

An enum for quant datatype, contains INT1 ~ INT16, UINT1 ~ UINT16.

QuantDtype is defined in dtype.py , use command below to import:

from mindspore import QuantDtype
Tutorial Examples:
value()[source]

Return value of QuantDtype. This interface is currently used to serialize or deserialize QuantDtype primarily.

Returns

An int as value of QuantDtype.

Examples

>>> from mindspore import QuantDtype
>>> print(QuantDtype.INT8.value())
7
>>> print(QuantDtype.UINT16.value())
115