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

Fix lu_factor_ex #268

Closed
wants to merge 1 commit into from
Closed

Fix lu_factor_ex #268

wants to merge 1 commit into from

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Sep 4, 2023

PR Docs

#256
info.item()转写修改

文档修改 PaddlePaddle/docs#6160

PR APIs

@paddle-bot
Copy link

paddle-bot bot commented Sep 4, 2023

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Sep 4, 2023
@co63oc co63oc added the HappyOpenSource 快乐开源活动issue与PR label Sep 5, 2023
API_TEMPLATE = textwrap.dedent(
"""
out1, out2, out3 = {}({})
out3 = paddle.to_tensor(out3.item(), dtype='int32')
Copy link
Collaborator

@zhwesky2010 zhwesky2010 Sep 5, 2023

Choose a reason for hiding this comment

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

这个功能 只是做一个cast为int32的类型变化吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

图片
shape会转换

@@ -37,7 +36,6 @@ def test_case_2():
import torch
x = torch.tensor([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=torch.float64)
LU, pivots, info = torch.linalg.lu_factor_ex(A=x)
info = info.item()
"""
)
obj.run(pytorch_code, ["LU", "pivots", "info"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个只有一个shape的差异吗,先设置 check_shape=False 来测试吧,这个问题我们会在框架上修复,shape=[]的0D更合理

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

@zhwesky2010 zhwesky2010 Sep 6, 2023

Choose a reason for hiding this comment

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

好吧,那暂时就先这样转吧,文档中说明下就可以,等修复0D这个问题后再删掉 info.item() 这行就可以

@zhwesky2010 zhwesky2010 closed this Sep 6, 2023
@co63oc co63oc deleted the api358_2 branch September 7, 2023 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants