Initializers¶
constant (shape[, value, name, borrow]) |
Initialize all the weights to a constant value |
uniform (shape[, scale, name, borrow]) |
Initialize all the weights from the uniform distribution |
normal (shape[, scale, name, borrow]) |
Initialize all the weights from the normal distribution |
glorot_uniform (shape[, gain, name, fan, borrow]) |
Initialize all the weights from the uniform distribution with glorot scaling |
glorot_normal (shape[, gain, name, fan, borrow]) |
Initialize all the weights from the normal distribution with glorot scaling |
He_uniform (shape[, name, borrow]) |
|
He_normal (shape[, name, borrow]) |
|
selu_normal (shape[, name, borrow]) |
|
orthogonal (shape[, gain, name, borrow]) |
Orthogonal initialization for Recurrent Networks |
Detailed description¶
-
yadll.init.
initializer
(init_obj, shape, name, **kwargs)[source]¶ Call an Initializer from an init_obj
Parameters: init_obj : init_obj
an init_obj is an initializer function or the tuple of (initializer function, dict of args) example : init_obj = glorot_uniform or init_obj = (glorot_uniform, {‘gain’:tanh, ‘borrow’:False})
shape : tuple or int
shape of the return shared variables
Returns
——-
Initialized shared variables
-
yadll.init.
constant
(shape, value=0.0, name=None, borrow=True, **kwargs)[source]¶ Initialize all the weights to a constant value
Parameters: shape
scale
-
yadll.init.
uniform
(shape, scale=0.5, name=None, borrow=True, **kwargs)[source]¶ Initialize all the weights from the uniform distribution
Parameters: shape
scale
name
borrow
kwargs
-
yadll.init.
normal
(shape, scale=0.5, name=None, borrow=True, **kwargs)[source]¶ Initialize all the weights from the normal distribution
Parameters: shape
scale
name
borrow
kwargs
-
yadll.init.
glorot_uniform
(shape, gain=1.0, name=None, fan=None, borrow=True, **kwargs)[source]¶ Initialize all the weights from the uniform distribution with glorot scaling
Parameters: shape
gain
name
fan
borrow
kwargs
References
[R1717] http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf
-
yadll.init.
glorot_normal
(shape, gain=1, name=None, fan=None, borrow=True, **kwargs)[source]¶ Initialize all the weights from the normal distribution with glorot scaling
Parameters: shape
gain
name
fan
borrow
kwargs
References
[R1919] http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf
-
yadll.init.
orthogonal
(shape, gain=1, name=None, borrow=True, **kwargs)[source]¶ Orthogonal initialization for Recurrent Networks
Orthogonal initialization solve the vanishing/exploding gradient for recurrent network.
Parameters: shape
gain
name
borrow
kwargs
References
[R2122] http://smerity.com/articles/2016/orthogonal_init.html