% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn-init.R
\name{nn_init_eye_}
\alias{nn_init_eye_}
\title{Eye initialization}
\usage{
nn_init_eye_(tensor)
}
\arguments{
\item{tensor}{a 2-dimensional torch tensor.}
}
\description{
Fills the 2-dimensional input \code{Tensor} with the identity matrix.
Preserves the identity of the inputs in \code{Linear} layers, where as
many inputs are preserved as possible.
}
\examples{
if (torch_is_installed()) {
w <- torch_empty(3, 5)
nn_init_eye_(w)
}
}
