
Last chance! 50% off unlimited learning
Sale ends in
Fills the 2-dimensional input Tensor
with the identity matrix.
Preserves the identity of the inputs in Linear
layers, where as
many inputs are preserved as possible.
nn_init_eye_(tensor)
a 2-dimensional torch tensor.
# NOT RUN {
if (torch_is_installed()) {
w <- torch_empty(3, 5)
nn_init_eye_(w)
}
# }
Run the code above in your browser using DataLab