torch.Tensor.index_fill_(dim, index, value) → Tensor
Fills the elements of the self
tensor with value value
by selecting the indices in the order given in index
.
- Parameters
-
-
dim (int) – dimension along which to index
-
index (LongTensor) – indices of
self
tensor to fill in -
value (float) – the value to fill with
-
标签:index,Tensor,dim,torch,value,fill From: https://www.cnblogs.com/zjuhaohaoxuexi/p/16711577.html