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 5th No.26】 为 Paddle 新增 diagonal_scatter API #675

Closed
wants to merge 1 commit into from

Conversation

bapijun
Copy link

@bapijun bapijun commented Sep 28, 2023

No description provided.

@paddle-bot
Copy link

paddle-bot bot commented Sep 28, 2023

你的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.

- `src` 为 tensor类型,用于填充input。
- `offset` int类型,可选,决定是哪一个对角线,默认为0。
- `dim1` int类型,可选,第一个维度来考虑对角线,默认为0。
- `dim1` int类型,可选,第而个维度来考虑对角线,默认为1。
Copy link
Contributor

Choose a reason for hiding this comment

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

dim2,第二个

Tensor.diagonal_scatter

```python
Tensor.diagonal_scatter(x, offset=0, dim1=0, dim2=1, name=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Tensor.diagonal_scatter(y, offset=0, dim1=0, dim2=1, name=None)?

# 六、测试和验收的考量
参考:[新增API 测试及验收规范](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/api_contributing_guides/api_accpetance_criteria_cn.html)

可考虑一下场景:
Copy link
Contributor

Choose a reason for hiding this comment

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

跟下面的重复了?
另外将测试文件放置的位置写一下


## API实现方案

参考MindSpore的方式去是实现对应的代码
Copy link
Contributor

@zxcd zxcd Oct 7, 2023

Choose a reason for hiding this comment

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

写出具体实现位置,如python/paddle/tensor/manipulation.py


## 3、意义

为 Paddle 新增 `paddle.diagonal_scatter` API,丰富Paddle的Tensor相关API,支持更多样的tensor操作
Copy link
Contributor

@zxcd zxcd Oct 7, 2023

Choose a reason for hiding this comment

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

和Tensor.diagonal_scatter,另外统一大小写

@luotao1
Copy link
Collaborator

luotao1 commented Nov 17, 2023

已经有 RFC 合入了,如果需要更新和完善,可以在原来的 RFC 上进行修改,感谢!

@luotao1 luotao1 closed this Nov 17, 2023
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.

3 participants