torch.nn.functional.grid_sample(input, grid, mode=‘bilinear’, padding_mode=‘zeros’)
其中,grid的shape为(N, H, W, 2)

对于output上的每一点,(x, y)三个通道的像素值,采集自input上某一点三个通道的像素值,采集的点存在于grid最低维,也就是(N, H, W, 2)中的2, [0]索引到input的x坐标,[1]索引到input的y坐标

关于pytorch grid_sample()

相关文章:

  • 2021-04-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2022-01-04
  • 2021-06-15
  • 1970-01-01
  • 2023-02-02
猜你喜欢
  • 2022-12-23
  • 2023-02-01
  • 2021-07-25
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案