neon.initializers.initializer.GlorotUniform

class neon.initializers.initializer.GlorotUniform(name='autouniformInit')[source]

Bases: neon.initializers.initializer.Initializer

Initializes parameter tensors with values drawn from a uniform distribution ranging from \(-K\) to \(K\). We define \(K=\sqrt{6 / (n_{in} + n_{out})}\), where \(n_{in}\) and \(n_{out}\) are the input and output dimensions, respectively, of the parameter tensor. This approach normalizes the range of the initialized values by the tensor dimensions.

From: “Understanding the difficulty of training deep feedforward neural networks” (http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf).

__init__(name='autouniformInit')[source]

Class constructor.

Parameters:name (string, optional) – Name to assign an instance of this class

Methods

__init__([name]) Class constructor.
fill(param) Fill the provided tensor with random values drawn from the Uniform distribution, using normalized bounds.
gen_class(pdict)
get_description([skip]) Returns a dict that contains all necessary information needed to serialize this object.
recursive_gen(pdict, key) helper method to check whether the definition
be = None
classnm

Returns the class name.

fill(param)[source]

Fill the provided tensor with random values drawn from the Uniform distribution, using normalized bounds.

Parameters:params (tensor) – Tensor to fill
gen_class(pdict)
get_description(skip=[], **kwargs)

Returns a dict that contains all necessary information needed to serialize this object.

Parameters:skip (list) – Objects to omit from the dictionary.
Returns:Dictionary format for object information.
Return type:(dict)
modulenm

Returns the full module path.

recursive_gen(pdict, key)

helper method to check whether the definition dictionary is defining a NervanaObject child, if so it will instantiate that object and replace the dictionary element with an instance of that object