mindspore.QuantDtype

查看源文件
class mindspore.QuantDtype[源代码]

MindSpore量化数据类型枚举类,包含 INT1 ~ INT16UINT1 ~ UINT16

QuantDtype 定义在 dtype.py 文件下 。运行以下命令导入环境:

from mindspore import QuantDtype
教程样例:
value()[源代码]

获取当前 QuantDtype 的值。该接口当前主要用于序列化或反序列化 QuantDtype

返回:

int,表示当前 QuantDtype 的值。

样例:

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