-
Notifications
You must be signed in to change notification settings - Fork 762
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
【PaddlePaddle Hackathon 2】9、为 Paddle 新增 logspace API #4497
Conversation
Thanks for your contribution! |
docs/api/paddle/logspace_cn.rst
Outdated
.. py:function:: paddle.logspace(start, stop, num, base=10.0, dtype=None, name=None) | ||
|
||
该OP返回一个Tensor,Tensor的值为在区间 :math:`[base^{start}, base^{stop}]` 上按对数均匀间隔的 :math:`num` 个值,输出Tensor的长度为num。 | ||
**注意:该OP不进行梯度计算** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 该OP的说法不准确,需要删掉
- 注意需要使用.. note::格式显示,参考
docs/api/paddle/logspace_cn.rst
Outdated
- **num** (int|Tensor) – ``num`` 是给定区间内需要划分的区间数,可以是一个整型标量,或是一个shape为[1]的Tensor,该Tensor的数据类型需为int32。 | ||
- **base** (int|float|Tensor) – ``base`` 是对数函数的底数,可以是一个标量,或是一个shape为[1]的Tensor,该Tensor的数据类型可以是float32,float64,int32或者int64。 | ||
- **dtype** (np.dtype|str, 可选) – 输出Tensor的数据类型,可以是float32,float64, int32或者int64。如果dtype的数据类型为None,输出Tensor数据类型为float32。 | ||
- **name** (str, 可选)- 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为None。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
完成
|
||
|
||
代码示例 | ||
:::::::::::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议使用copy-from的方式同步代码,参考
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
完成
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
增加logspace API中文文档,该算子实现的PR为PaddlePaddle/Paddle#41261
PADDLEPADDLE_PR=41261