forked from PaddlePaddle/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add paddle.iinfo chinese document (PaddlePaddle#5235)
* paddle.iinfo * Update iinfo_cn.rst * add paddle.iinfo * Update iinfo_cn.rst * Update Overview_cn.rst * Update iinfo_cn.rst * Update iinfo_cn.rst * Update iinfo_cn.rst * Update iinfo_cn.rst Co-authored-by: Ligoml <[email protected]>
- Loading branch information
1 parent
e41b6aa
commit f0a5892
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. _cn_api_iinfo: | ||
|
||
iinfo | ||
------------------------------- | ||
|
||
.. py:function:: paddle.iinfo(dtype) | ||
返回一个 ``iinfo`` 对象,该对象包含了输入 ``dtype`` 的各种相关的数值信息。其中输入 ``dtype`` 只能是整数类型的 ``paddle.dtype`` 。 | ||
|
||
其功能类似 `numpy.iinfo <https://numpy.org/doc/stable/reference/generated/numpy.iinfo.html#numpy-iinfo>`_ 。 | ||
|
||
|
||
参数 | ||
::::::::: | ||
- **dtype** (paddle.dtype) - 输入的数据类型,只能为:paddle.uint8、 paddle.int8、 paddle.int16、 paddle.int32 和 paddle.int64 。 | ||
|
||
返回 | ||
::::::::: | ||
一个 ``iinfo`` 对象,其中包含 4 个属性,如下所示: | ||
|
||
- **min** (int) - 该数据类型所能表示的最小的整数; | ||
- **max** (int) - 该数据类型所能表示的最大的整数; | ||
- **bits** (int) - 该数据类型所占据的 bit 位数; | ||
- **dtype** (str) - 该数据类型的字符串名称。 | ||
|
||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.iinfo |