Skip to content

Convolution with boundary conditions #4

@balbasty

Description

@balbasty

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions