Closed kitbransby closed 2 years ago
Hi, In the tensorflow compatible version you interpolate the four nearest pixels like the original implementation,
i.e output = Q11 + Q21 + Q12 + Q22
output = Q11 + Q21 + Q12 + Q22
but in the new version it seems like you sample from a single pixel. Have I understood that correctly?
output = F.grid_sample(img_feat, sample_points.unsqueeze(1), align_corners=True) output = torch.transpose(output.squeeze(2), 1, 2)
F.grid_sample works in bilinear interpolation, so it should be the same as the weighted summation.
Hi, In the tensorflow compatible version you interpolate the four nearest pixels like the original implementation,
i.e
output = Q11 + Q21 + Q12 + Q22
but in the new version it seems like you sample from a single pixel. Have I understood that correctly?