Expand description
§concision-init
This library provides various random distribution and initialization routines for the
concision
framework. It includes implementations for different initialization strategies
optimized for neural networks, such as Glorot (Xavier) initialization, LeCun
initialization, etc.
Re-exports§
pub use rand;
pub use rand_distr;
Modules§
- distr
- this module implements various random distributions optimized for neural network initialization.
- error
Structs§
- Lecun
Normal - LecunNormal is a truncated normal distribution centered at 0 with a standard deviation that is calculated as:
- Truncated
Normal - The
TruncatedNormal
distribution is similar to theStandardNormal
distribution, differing in that is computes a boundary equal to two standard deviations from the mean. More formally, the boundary is defined as: - Xavier
Normal - Normal Xavier initializers leverage a normal distribution centered around
0
and using a standard deviation ($\sigma$) computed by: - Xavier
Uniform - Uniform Xavier initializers use a uniform distribution to initialize the weights of a neural network within a given range.
Enums§
Traits§
- Init
- A trait for creating custom initialization routines for models or other entities.
- Init
Inplace - This trait enables models to implement custom, in-place initialization methods.
- Initialize
- This trait provides the base methods required for initializing tensors with random values.
The trait is similar to the
RandomExt
trait provided by thendarray_rand
crate, however, it is designed to be more generic, extensible, and optimized for neural network initialization routines. Initialize is implemented forArrayBase
as well asParamsBase
allowing you to randomly initialize new tensors and parameters.
Functions§
- randc
- Generate a random array of complex numbers with real and imaginary parts in the range [0, 1)
- stdnorm
- Given a shape, generate a random array using the StandardNormal distribution
- stdnorm_
from_ seed - uniform_
from_ seed - Creates a random array from a uniform distribution using a given key