When will unfold and fold support 5D tensors?

Currently, only 4-D input tensors (batched image-like tensors) are supported by unfold and fold

I assume the size is (N, C, H, W)

a set of 3D medical images are 5D tensors: (N, C, D, H, W)

When will unfold and fold support 5D tensors?

Hi,

I don’t think there is any plan to support generalised versions of fold and unfold.
You have Conv3D if you need to do convolutions though.

@fmassa migh be more familiar about how easy/hard it would be to generalise fold and unfold?

It is about custom convolution operation like this one

@liangbright: What does it mean fold and unfold? Pytorch supports almost 3D operators likes conv, pool, upsampling…

@liangbright, if you want to use a 3D sliding window you can use the grid sampler in TorchIO, as I explained in this topic: How to extract 2D patches from 3D medical image.