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

Implementation of gradient_map does not support >1 channels #332

Open
zakajd opened this issue Jan 27, 2023 · 0 comments · May be fixed by #333
Open

Implementation of gradient_map does not support >1 channels #332

zakajd opened this issue Jan 27, 2023 · 0 comments · May be fixed by #333
Assignees
Labels
bug Something isn't working

Comments

@zakajd
Copy link
Collaborator

zakajd commented Jan 27, 2023

Describe the bug
According to documentation this function should work for images with arbitrary number of channels, but current implementation fails for C<> 1.

Also documentation says that expected kernel shape is [n, k, k] while in reality we always pass [n, 1, k, k]. [n, k, k] is actually not supported due to the same error in implementation

To Reproduce

x = torch.randn(4, 3, 16, 16)
kernels = torch.randn(2, 1, 3, 3) # should be torch.randn(2, 3, 3) 

output = gradient_map(x, kernels)

Expected behavior
No errors, proper computation.

Additional context
Not sure yet, but probably this function also doesn't support kN != 2. Will check while fixing
UPD: Supports, but probably math for kN > 2 should be different. Won't dig into that now

@zakajd zakajd added the bug Something isn't working label Jan 27, 2023
@zakajd zakajd linked a pull request Jan 27, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant