hmkx/HiNeRV

Why do we need to implement two Interpolations?

Closed this issue · 2 comments

https://github.com/hmkx/HiNeRV/blob/fdb92ec22492246f800621dfd454f6a5c62ab75b/models/upsample.py#L129C9-L153C42

Hi, thank you for this great work. When I saw this code, I was confused about why Interpolation was not used directly during training. Instead of using matrix multiplication, is there any difference between the two? Thank you for your patient answer.

hmkx commented

Hi, this is because of the performance.
The pytorch F.interpolate was slower when training with patches.
Although matrix multiplication increases the amount of computation, it is faster, at least for the GPU we tested.

Thank you very much for your reply.