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 7th No.55] BUG FIX paddle.nn.functional.fold -part #70102

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

DrRyanHuang
Copy link
Member

@DrRyanHuang DrRyanHuang commented Dec 10, 2024

PR Category

User Experience

PR Types

Bug fixes

Description

import paddle

unfolded = paddle.randn([16, 4410, 201])
folded = paddle.nn.functional.fold(
    unfolded,
    output_sizes=(1, 445410),
    kernel_sizes=(1, 4410),
    strides=(1, 2205), )
print(folded.shape)
(InvalidArgument) The `output_height` should be greater than one, but received output_height: 1 .
  [Hint: Expected output_height > 1, but received output_height:1 <= 1:1.] (at /paddle/paddle/phi/infermeta/unary.cc:1597)
  File "/home/aistudio/PaddleSpeech/audio/audiotools/core/dsp.py", line 131, in overlap_and_add
    folded = paddle.nn.functional.fold(
  File "/home/aistudio/PaddleSpeech/audio/tests/audiotools/core/test_dsp.py", line 31, in _test
    recombined = windowed_signal.overlap_and_add(hop_duration)
  File "/home/aistudio/PaddleSpeech/audio/tests/audiotools/core/test_dsp.py", line 36, in test_overlap_add
    _test(nz_signal)
  File "/home/aistudio/PaddleSpeech/audio/tests/audiotools/core/test_dsp.py", line 39, in <module>
    test_overlap_add(10.0, 44100, 0.1)

However,

import torch
unfolded = torch.randn(16, 4410, 201)
folded = torch.nn.functional.fold(
    unfolded,
    output_size=(1, 445410),
    kernel_size=(1, 4410),
    stride=(1, 2205),
)
print(folded.shape) # torch.Size([16, 1, 1, 445410])

Copy link

paddle-bot bot commented Dec 10, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Dec 10, 2024
@DrRyanHuang DrRyanHuang changed the title Fix paddle.nn.functional.fold [Hackathon 7th No.55] BUG FIX paddle.nn.functional.fold Dec 10, 2024
@luotao1
Copy link
Contributor

luotao1 commented Dec 16, 2024

CodeStyle没过

Copy link

paddle-ci-bot bot commented Dec 26, 2024

Sorry to inform you that 095401d's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

)
except:
print(
"clang-tidy not found, attempting auto-install...", file=sys.stderr
)
subprocess.check_output(
'pip install --no-cache clang-tidy=="15.0.2.1"', shell=True
'python3 -mpip install --no-cache clang-tidy=="15.0.2.1"',
shell=True,
)
Copy link
Member Author

Choose a reason for hiding this comment

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

This part is used to prevent the execution of Python2 pip.

paddle/phi/infermeta/unary.cc Outdated Show resolved Hide resolved
@luotao1 luotao1 changed the title [Hackathon 7th No.55] BUG FIX paddle.nn.functional.fold [Hackathon 7th No.55] BUG FIX paddle.nn.functional.fold -part Jan 3, 2025
@luotao1
Copy link
Contributor

luotao1 commented Jan 3, 2025

📢:请尽快完善锁定的PR,并确保在2025年1月10日(不再延期)前完成合入。逾期未合入PR将无法获得奖金发放。

Copy link
Contributor

@zxcd zxcd left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit a93c881 into PaddlePaddle:develop Jan 3, 2025
32 checks passed
@DrRyanHuang DrRyanHuang deleted the patch-1 branch January 3, 2025 03:07
@YuanRisheng
Copy link
Contributor

db2997c52dbf6e606e99fd14aa0c5d2a
这个pr修改了clang_tidy.py看起来会导致以上bug,这个能修一下吗

@DrRyanHuang
Copy link
Member Author

DrRyanHuang commented Jan 3, 2025

@YuanRisheng 好的

#70616

@YuanRisheng
Copy link
Contributor

这里报错的原因是有些环境里没有python3这个命令,比如我的环境,python就是python3.8,没有python3这个命令,实际上我理解你应该把你的环境python替换成python3.x,而不是把这里的命令硬改成python3

@SigureMo
Copy link
Member

SigureMo commented Jan 3, 2025

@YuanRisheng 修完 merge 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants