How to realize an arbitrary dimension convolution class?

I’m looking for an 6D convolution class, here are some source code :

But I find that backward() function is absent in there class . So how to write a backward() function in Nd convolution ? Or We need not to write a backward() function ,since it will be created by Pytorch ?

Hi. I think you are right that it will be created by PyTorch. If conv6d is constructed from PyTorch’s conv3d’s, automatic differentiation should track the operations. The definite way to know is simply to try it. PyTorch will throw an error if loss.backward() cannot be computed.

I am very curious about how you will use conv6d!

thank you ,I’m trying it.
the conv6d is used for a dataset created by myself, and I’m trying to extract the inner feature in the 6D dataset.