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

Convolution with boundary conditions #4

Open
balbasty opened this issue Jun 9, 2020 · 0 comments
Open

Convolution with boundary conditions #4

balbasty opened this issue Jun 9, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@balbasty
Copy link
Owner

balbasty commented Jun 9, 2020

PyTorch's convolutions return domain is the joint domain of the input tensor and kernel. This means that the tensor is implicitly cropped by an amount that corresponds to the kernel size. Furthermore, padding mode other than zero trigger an allocation.

I propose to implement a nitorch-specific convolution that is more in-line with the behaviour of spm's vel2mom, where the output domain is the same as the input domain (up to strides), and boundary conditions are handled on the fly. Such an implementation cannot use CuDNN, so will be slower than PyTorch's version, but will make gradient-based regularisers easier to implement.

This feature is in active development in banch conv.

@balbasty balbasty added the enhancement New feature or request label Jun 9, 2020
@balbasty balbasty self-assigned this Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant