neon.transforms.activation.Softmax

class neon.transforms.activation.Softmax(axis=0, name=None, epsilon=1.1920928955078125e-07)[source]

Bases: neon.transforms.transform.Transform

SoftMax activation function. Ensures that the activation output sums to 1.

__init__(axis=0, name=None, epsilon=1.1920928955078125e-07)[source]

Class constructor.

Parameters:
  • name (string, optional) – Name (default: none)
  • epsilon (float, optional) – Not used.
  • axis (int, optional) – axis to perform softmax (default: 0)

Methods

__init__([axis, name, epsilon]) Class constructor.
bprop(x) Returns the derivative.
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
bprop(x)[source]

Returns the derivative.

Parameters:x (Tensor or optree) – Input value
Returns:Integer value 1
classnm

Returns the class name.

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