torch.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: