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

再求教一个问题:为什么WaveletsTransform传入的张量要设置成五维的? #2

Open
qi-jinnian opened this issue Jul 6, 2024 · 1 comment

Comments

@qi-jinnian
Copy link

在你的utils文件中的WaveletsTransform函数中wavelets = self.transform(x=x.unsqueeze(1)),为什么要对输入的x进行unsqueeze(1),使它变成五维的张量,这样对于二维小波变换不是错误的吗?

@brunobelloni
Copy link
Owner

its because this library i've been using requires another dimension to apply wavelet transform.

from pytorch_wavelets import DWTInverse, DWTForward

so i apply the unsqueeze on library's input and squeeze on library's output.

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

No branches or pull requests

2 participants