!47578 add api doc for mindspore.QuantDtype

Merge pull request !47578 from hangq/wood
This commit is contained in:
i-robot 2023-01-06 06:18:48 +00:00 committed by Gitee
commit 37de35e329
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 23 additions and 2 deletions

View File

@ -36,6 +36,7 @@ mindspore
mindspore.dtype_to_pytype
mindspore.pytype_to_dtype
mindspore.get_py_obj_dtype
mindspore.QuantDtype
运行环境
---------

View File

@ -0,0 +1,19 @@
mindspore.QuantDtype
====================
.. py:class:: mindspore.QuantDtype
MindSpore量化数据类型枚举类包含 `INT1` ~ `INT16``UINT1` ~ `UINT16`
`QuantDtype` 定义在 `/mindspore/common/dtype.py` 文件下 。运行以下命令导入环境:
.. code-block::
from mindspore import QuantDtype
.. py:method:: value(self)
获取当前 `QuantDtype` 的值。
返回:
int表示当前 `QuantDtype` 的值。

View File

@ -143,6 +143,7 @@ DataType
mindspore.dtype_to_pytype
mindspore.pytype_to_dtype
mindspore.get_py_obj_dtype
mindspore.QuantDtype
Context
--------

View File

@ -21,7 +21,7 @@ from mindspore.common.dtype import Type, int8, byte, int16, short, int32, intc,
float32, single, float64, double, bool_, float_, list_, tuple_, int_, \
uint, number, tensor, string, type_none, tensor_type, Int, \
complex64, complex128, dtype_to_nptype, _null, _null_type, \
dtype_to_pytype, pytype_to_dtype, get_py_obj_dtype
dtype_to_pytype, pytype_to_dtype, get_py_obj_dtype, QuantDtype
from mindspore.common.dump import set_dump
from mindspore.common.parameter import Parameter, ParameterTuple
from mindspore.common.seed import set_seed, get_seed
@ -50,7 +50,7 @@ __all__ = [
"number", "tensor",
"string", "type_none",
"_null",
"tensor_type",
"tensor_type", "QuantDtype",
"Type", "Int", "_null_type",
"complex64", "complex128",
# __method__ from dtype