neon.initializers.initializer.Initializer

class neon.initializers.initializer.Initializer(name=None)[source]

Bases: neon.NervanaObject

Abstract base class from which parameter tensor initializers inherit.

Subclasses should implement the fill method which takes as input a Tensor and fills the values based on the initialization scheme.

__init__(name=None)

Class constructor.

Parameters:name (str, optional) – Name to assign instance of this class.

Methods

__init__([name]) Class constructor.
fill(param) Initialize the provided tensor with values.
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]

Initialize the provided tensor with values.

Parameters:param (Tensor) – Input Tensor.
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