Pythorch gather函数
Pytorch torch.gather 函数
官方文档
torch.gather(input, dim, index, out=None) → Tensor
Gathers values along an axis specified by dim.
For a 3-D tensor the output is specified by:
out[i][j][k] = input[index[i][j][k]][j][k] # dim=0
out[i][j][k]
原创
2020-06-29 11:37:13 ·
243 阅读 ·
0 评论