eye_

dragon.vm.torch.nn.init.eye_(tensor)[source]

Fill tensor as the identity matrix.

\[\text{tensor} \leftarrow \text{diag}(1, 1, ..., 1) \]
Parameters:
Returns:

dragon.vm.torch.Tensor – The input tensor.