torch.Tensor.index_fill_ — PyTorch 1.10.1 documentation
pytorch.org › torchtorch.Tensor.index_fill_ — PyTorch 1.10.1 documentation torch.Tensor.index_fill_ 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
torch.Tensor — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/tensorstorch.ByteTensor. /. 1. Sometimes referred to as binary16: uses 1 sign, 5 exponent, and 10 significand bits. Useful when precision is important at the expense of range. 2. Sometimes referred to as Brain Floating Point: uses 1 sign, 8 exponent, and 7 significand bits. Useful when range is important, since it has the same number of exponent bits ...
torch.Tensor.fill_diagonal_ — PyTorch 1.10.1 documentation
pytorch.org › torchtorch.Tensor.fill_diagonal_ Tensor.fill_diagonal_(fill_value, wrap=False) → Tensor Fill the main diagonal of a tensor that has at least 2-dimensions. When dims>2, all dimensions of input must be of equal length. This function modifies the input tensor in-place, and returns the input tensor. Parameters fill_value ( Scalar) – the fill value