DistributedFlux.orthogonal
— Methodorthogonal(dim)
Return a random orthogonal maxtrix of size (dim, dim)
. This is commonly used for kernel initialization of recurrent layers.
Examples
julia> Flux.orthogonal(2)
2×2 Array{Float32,2}:
-0.633973 -0.773356
-0.773356 0.633973
See Exact solutions to the nonlinear dynamics of learning in deep linear neural networks
DistributedFlux.orthogonal_matrix
— Methodorthogonal_matrix(nrow, ncol)
If the shape of the matrix to initialize is two-dimensional, it is initialized with an orthogonal matrix obtained from the QR decomposition of a matrix of random numbers drawn from a normal distribution. If the matrix has fewer rows than columns then the output will have orthogonal rows. Otherwise, the output will have orthogonal columns.