neon.transforms.cost.LogLoss

class neon.transforms.cost.LogLoss[source]

Bases: neon.transforms.cost.Metric

LogLoss metric.

Computes \(\log\left(\sum y*t\right)\).

__init__()[source]

Methods

__init__()
bprop(y, t) Computes the derivative of the cost function
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(y, t)

Computes the derivative of the cost function

Parameters:
  • y (Tensor or OpTree) – Output of previous layer or model
  • t (Tensor or OpTree) – True targets corresponding to y
Returns:

Returns the derivative of the cost function

Return type:

OpTree

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