neon.initializers.initializer.Kaiming

class neon.initializers.initializer.Kaiming(local=True, name='Kaiming')[source]

Bases: neon.initializers.initializer.Initializer

Initializes parameters with a zero-mean Gaussian distribution. The standard deviation is automatically set as \(\sigma=\sqrt{2 / n_{in}}\), where \(n_{in}\) is the input dimension of the tensor.

Based on the initializer described in: http://arxiv.org/pdf/1502.01852.pdf.

__init__(local=True, name='Kaiming')[source]

Class constructor.

Parameters:
  • local (bool, optional) – Whether the layer type is local (Convolutional) or not. Default is True.
  • name (string, optional) – Name to assign an instance of this class.

Methods

__init__([local, name]) Class constructor.
fill(param) Fill the provided tensor with random values drawn from a gaussian distribution.
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 a gaussian distribution.

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