speye

speye(n, dtype=torch.float32)[source]

identity matrix of dimension n as sparse_coo_tensor.