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

Add bmm module #5334

Merged
merged 10 commits into from
Jun 29, 2021
Merged

Add bmm module #5334

merged 10 commits into from
Jun 29, 2021

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Jun 28, 2021

添加bmm module。api文档如下:

图片

doctest

图片

为什么没有对齐pytorch的两个attr参数,考虑到如下原因:

deterministic : 和具体选取哪种实现方法有关系,oneflow只有一种计算方法。
out :将一个输出tensor作为属性传进来,因为bmm返回的就是一个Tensor,所以丢弃这个参数。

super().__init__()

def forward(self, input, mat2):
return flow.F.batch_matmul(input, mat2)
Copy link
Contributor

Choose a reason for hiding this comment

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

对input和mat2的维度加一下check吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

@oneflow-ci-bot oneflow-ci-bot removed their request for review June 29, 2021 02:12
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 29, 2021 02:13
@jackalcooper jackalcooper merged commit b234ca7 into master Jun 29, 2021
@jackalcooper jackalcooper deleted the add_bmm_module branch June 29, 2021 04:02
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