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

Issue in torch 1.7.1 #20

Open
kiranchari opened this issue Mar 8, 2021 · 2 comments
Open

Issue in torch 1.7.1 #20

kiranchari opened this issue Mar 8, 2021 · 2 comments

Comments

@kiranchari
Copy link

Hi @zh217,

I just installed torch-dct and tried the test on the README page. I am getting an AssertionError. The value of (torch.abs(x - y)).sum() is small though: 3.0896e-05.

Any idea what maybe the issue? Happy to help. Thanks

x = torch.randn(200)
X = dct.dct(x) # DCT-II done through the last dimension
y = dct.idct(X) # scaled DCT-III done through the last dimension
assert (torch.abs(x - y)).sum() < 1e-10 # x == y within numerical tolerance

AssertionError Traceback (most recent call last)
in
X = dct.dct(x) # DCT-II done through the last dimension
y = dct.idct(X) # scaled DCT-III done through the last dimension
assert (torch.abs(x - y)).sum() < 1e-10 # x == y within numerical tolerance

@GuoLanqing
Copy link

Hi, I meet the same question. The scale of your input image is [0,1]?

@jonnor
Copy link

jonnor commented Nov 7, 2022

Am also seeing values around the same. For example 2.6974e-05
Probably this is good enough for most applications, and we can just update the README?

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

3 participants