Why is interpolate() function so slow?

Does anybody have any idea why the interpolate function in PyTorch is so slow?

The forward part of interpolate() is fast, however the backward part is really slow.
If you only use 1 or 2 times of interpolate() you may not notice the speed, but if you use this function 10+ times you’ll find the whole training time doubles (e.g., training imagenet).

1 Like

I also met similar problem recently. Have you find a method to fix it?

I met the same problem as well, the training become 6 times slower when adding tow Upsample module in each BottleNeck Block.

And the main problem is the backward indeed. If the backward path is blocked, the training will be four times faster

Nope, I haven’t found out a proper solution.