-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix lu_factor_ex #268
Conversation
Thanks for your contribution! |
API_TEMPLATE = textwrap.dedent( | ||
""" | ||
out1, out2, out3 = {}({}) | ||
out3 = paddle.to_tensor(out3.item(), dtype='int32') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个功能 只是做一个cast为int32的类型变化吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -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"]) |
There was a problem hiding this comment.
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更合理
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/PaddlePaddle/PaConvert/blob/master/tests/apibase.py
参数不包括 check_shape
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好吧,那暂时就先这样转吧,文档中说明下就可以,等修复0D这个问题后再删掉 info.item()
这行就可以
PR Docs
#256
info.item()转写修改
文档修改 PaddlePaddle/docs#6160
PR APIs