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

【Hackathon No.13】为 Paddle 新增 triu_indices API #207

Merged
merged 4 commits into from
Aug 15, 2022

Conversation

Rayman96
Copy link
Contributor

No description provided.

@paddle-bot
Copy link

paddle-bot bot commented Aug 15, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

pytorch 中接口配置为:

```python
func: triu_indices(int row, int col, int offset=0, *, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor

Choose a reason for hiding this comment

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

这里的接口指的是用户调用时会使用到的接口,因此要以pytorch官网的torch.triu_indices接口描述为准。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改为pytorch官方文档描述


## python API实现方案

在`python/paddle/fluid/layers/tensor.py`中增加`triu_indices`函数,添加英文描述

Choose a reason for hiding this comment

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

和tril_indices保持一致,放在python/paddle/tensor/creation.py中

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

@betterpig betterpig left a comment

Choose a reason for hiding this comment

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

LGTM

@betterpig betterpig merged commit 50abd7d into PaddlePaddle:master Aug 15, 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.

4 participants