initializers module¶
- class initializers.Initializer(seed=None)¶
Bases:
object
Initializer parent class.
- seed¶
Seed of pseudo-random generators such as random parameter initialization.
- Type
int
- __init__(seed=None)¶
Constuctor.
- class initializers.NormalInitializer(seed, **params)¶
Bases:
initializers.Initializer
Normal, or Gaussian, parameter initializer.
- coeff¶
Multiplicative coefficient of Normal distribution.
- Type
float
- mean¶
Mean of Normal distribution.
- Type
float
- std¶
Standard deviation of Normal distribution.
- Type
float
- __init__(seed=None, \*\*params)¶
Constuctor.
- initialize(size)¶
Initializes parameters by drawing from a Normal distribution.
- __repr__()¶
Returns the string representation of class.
- initialize(size)¶
Initializes parameters by drawing from a Normal distribution.
- Parameters
size (tuple) – Tuple of dimensions of the parameter tensor.
- Returns
Initialized parameters.
- Return type
numpy.ndarray
Notes
None
- class initializers.XavierInitializer(seed, **params)¶
Bases:
initializers.Initializer
Xavier initializer. From: Understanding the difficulty of training deep feedforward neural networks
- coeff¶
Multiplicative coefficient of Normal distribution.
- Type
float
- mean¶
Mean of Normal distribution.
- Type
float
- std¶
None as the Xavier initializer computes on its own the standard deviation of the Normal distribution.
- Type
- __init__(seed=None, \*\*params)¶
Constuctor.
- initialize(size)¶
Initializes parameters by drawing from a Normal distribution.
- __repr__()¶
Returns the string representation of class.
- initialize(size)¶
Initializes parameters by drawing from a Normal distribution with the Xavier strategy.
- Parameters
size (tuple) – Tuple of dimensions of the parameter tensor.
- Returns
Initialized parameters.
- Return type
numpy.ndarray
Notes
None