src.feature_align.bilinear_interpolate¶
- src.feature_align.bilinear_interpolate(im: torch.Tensor, x: torch.Tensor, y: torch.Tensor, device=None)[source]¶
Bi-linear interpolate 3d feature map to 2d coordinate (x, y). The coordinates are at the same scale of \(w\times h\).
- Parameters
im – \((c\times w\times h)\) feature map
x – \((1)\) x coordinate
y – \((1)\) y coordinate
device – output device. If not specified, it will be the same as the input
- Returns
\((c)\) interpolated feature vector