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

【PaddlePaddle Hackathon 2】9、为 Paddle 新增 logspace API #4497

Merged
merged 4 commits into from Apr 27, 2022
Merged

【PaddlePaddle Hackathon 2】9、为 Paddle 新增 logspace API #4497

merged 4 commits into from Apr 27, 2022

Conversation

BrilliantYuKaimin
Copy link
Contributor

@BrilliantYuKaimin BrilliantYuKaimin commented Apr 8, 2022

增加logspace API中文文档,该算子实现的PR为PaddlePaddle/Paddle#41261
PADDLEPADDLE_PR=41261

@paddle-bot-old
Copy link

paddle-bot-old bot commented Apr 8, 2022

Thanks for your contribution!

.. 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不进行梯度计算**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 该OP的说法不准确,需要删掉
  • 注意需要使用.. note::格式显示,参考

- **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。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

注意:

  • 中英文标点符号不要混用
  • 中文标点符号使用正确「,」应为「、」
  • 尽量避免多一个空格少一个空格的情况~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完成



代码示例
::::::::::::
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议使用copy-from的方式同步代码,参考

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完成

Copy link
Collaborator

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ligoml Ligoml merged commit e279a30 into PaddlePaddle:develop Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants