-
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
【PaddlePaddle Hackathon 5th No.42】转换规则 第一组 #301
Conversation
Thanks for your contribution! |
@zhwesky2010 您好麻烦看一下stft,精度好像有些问题,差距有点大,但是我在本地是可以通过的,其他部分没有问题 |
CI上是CPU的版本,你本地用CPU试一下,另外每一组有约20个API,这一组其他的呢 |
if kwargs is None: | ||
return None | ||
|
||
if "reps" in kwargs: |
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.
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.
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.
return code | ||
|
||
|
||
class StftMatcher(BaseMatcher): |
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.
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.
已添加
tests/test_Tensor_quantile.py
Outdated
pytorch_code = textwrap.dedent( | ||
""" | ||
import torch | ||
result = torch.tensor([0., 1., 2., 3.],dtype=torch.float64).quantile(0.6, dim=None, keepdim=False) |
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.
dim输入实际值
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.
已添加
obj = APIBase("torch.Tensor.quantile") | ||
|
||
|
||
def test_case_1(): |
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.
(0.13631296157836914+0j) , | ||
(-0.19927024841308594+0j) , | ||
(0.19927024841308594+0j) ]]) | ||
result = x.stft(n_fft=4, onesided=False, return_complex=True) |
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.
同上
) | ||
|
||
|
||
def test_case_2(): |
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.
同上,测试内容不全
参考test_Tensor_reshape的测试
def test_case_4(): | ||
pytorch_code = textwrap.dedent( | ||
""" | ||
import torch |
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.
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.
已修改添加
obj = APIBase("torch.stft") | ||
|
||
|
||
def test_case_1(): |
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.
同上
这一部分是由文档的部分,其他的需要我先去补充下文档合入后,再作为第二个pr提交 |
if kwargs is None: | ||
return None | ||
|
||
if "reps" in kwargs: |
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.
@@ -30,6 +30,18 @@ def test_case_1(): | |||
obj.run( | |||
pytorch_code, | |||
["result"], | |||
unsupport=True, | |||
reason="Paddle not support this api convert now", | |||
) |
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.
参考最新的test_Tensor_permute测试,包含十几种用例
@zrr1999 PR未通过单测测试,另外已经有文档的需要全部检查一下,如果有问题也需要修正。 |
@zrr1999 转换规则第1组只剩下 torch.stft @Li-fAngyU 这个PR里有 torch.stft 的处理,看看能否合作? |
PR Docs
https://github.com/PaddlePaddle/docs/pull/5751/files#diff-4edc87fd8fe3db15402459c161ba90be7f26cb3ffd4d25612e8bbc386442059d
PR APIs