Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Paddle Tensor No.22】新增paddle.less,Tensor.less中文文档 #6989

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/api/paddle/Tensor_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,15 @@ less_than(y, name=None)

请参考 :ref:`cn_api_paddle_less_than`

less(y, name=None)
:::::::::

返回:计算后的 Tensor

返回类型:Tensor

请参考 :ref:`cn_api_paddle_less`

lgamma(name=None)
:::::::::

Expand Down
29 changes: 29 additions & 0 deletions docs/api/paddle/less_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _cn_api_paddle_less:

less
-------------------------------
.. py:function:: paddle.less(x, y, name=None)


逐元素地返回 :math:`x < y` 的逻辑值,相同位置前者输入小于后者输入则返回 True,否则返回 False。使用重载算子 `<` 可以有相同的计算函数效果。

.. note::
输出的结果不返回梯度。

参数
::::::::::::

- **x** (Tensor) - 输入 Tensor,支持的数据类型包括 bool、bfloat16、float16、float32、float64、uint8、int8、int16、int32、int64。
- **y** (Tensor) - 输入 Tensor,支持的数据类型包括 bool、bfloat16、float16、float32、float64、uint8、int8、int16、int32、int64。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。


返回
::::::::::::
输出结果的 Tensor,输出 Tensor 的 shape 和输入一致,Tensor 数据类型为 bool。


代码示例
::::::::::::

COPY-FROM: paddle.less