Skip to content

Loss Functions and Metrics

Frank Seide edited this page Aug 19, 2016 · 23 revisions

CNTK contains a number of common predefined loss functions. In addition, custom loss functions can be defined as BrainScript expressions.

CrossEntropy(), CrossEntropyWithSoftmax()

Computes the cross entropy

CrossEntropyWithSoftmax (L, z)

Parameters

  • L

    CrossEntropyWithSoftmax_new (L, z, tag='') = Minus (ReduceLogSum (z), TransposeTimes (L, z), tag=tag)

ErrorPrediction{}

ErrorPrediction (L, z)

ErrorPrediction_new (L, z, tag='')         = Minus (BS.Constants.One, TransposeTimes (L, Hardmax (z)), tag=tag)
Clone this wiki locally