Need a robust way to resize

Hi,

  1. I need a way to resize the inputs like MaxPool2d do with kernel size
nn.MaxPool2d(kernel_size=2)

but in a form like Resize because Resize has interpolation mode to set.

I checked a bit, seams like neither of the pooling methods has interpolation parameter to set.

  1. The other thing I need is something like maxunpooling2d with kernel size. I would like to set the kernel size of 2 to double the size of the input axes keeping the max values. Currently as I checked maxunpooling2d sets 0 for elements other than indices, and you need to provide the indices.

Pooling layers are not interpolating but are applying the pool operation on the used window.
E.g. MaxPool2d will apply torch.max on each window and will not try to calculate any interpolated values, AvgPool2d will use torch.mean etc.

I don’t fully understand which values should be interpolated at all using this window approach.

Actually I only needed F.Interpolate(x, scale_factor). :star_struck: