What functions in PyTorch do I use to interpolate within existing image without resizing

I want to get replace zero-values using cubic interpolation within an image without resizing. Is it possible to achieve it with PyTorch?

It seems like torch.nn.functional.interpolate only interpolates for resizing.

F.interpolate will most likely call this method and just copy the inputs to the output tensor.
I think it’s just possible to really trigger the interpolation by changing the size slightly.

Do you need to backpropagate through this interpolation? If no, then you could use a numpy or scipy implementation. I’m not sure how general this use case is, but it might be worth to create a feature request on GitHub and discuss your use case there.

@csailnadi Did you able to do it? It would be a great help if you can share.