As I have stated earlier in my opening statement that torch.nn.functional.interpolate() only works for the 3d-data and so on. I am purely dealing with 2-d data. Solution which you suggested is not a legible one for my case. as I am dealing with 2d- data. Read my last answer, in that I have clearly stated dimensions of batched in every step.