detach
detach()后的变量和原变量共享数据内存,但是不带有梯度。
参考 https://zhuanlan.zhihu.com/p/38475183
scatter_
scatter_(dim, index, src) → Tensor
self[index[i][j][k]][j][k] = src[i][j][k] # if dim == 0
self[i][index[i][j][k]][k] = src[i][j][k] # if dim == 1
self[i][j][index[i][j][k]] = src[i][j][k] # if dim == 2
参考 https://www.cnblogs.com/hellcat/p/8445250.html
https://pytorch.org/docs/stable/tensors.html