Thanks for the excellent work!
In the computation of NCC loss, it seems that the convolution operation together with indexing ref_sum = F.conv2d(...) is equivalent to directly summing over the patch ref_sum = ref.sum(dim=[-1, -2]). What are the advantages of using convolution compared to a direct summation over the local region?