Compute focal cross-entropy loss
computes the focal cross-entropy between network predictions and target values for
single-label and multi-label classification tasks. The classes are mutually-exclusive
classes. The focal cross-entropy loss weights towards poorly classified training samples and
ignores well-classified samples. The focal cross-entropy loss is computed as the average
logarithmic loss divided by number of non-zero targets.dlY
= focalCrossEntropy(dlX
,targets
)
specifies options using one or more name-value pair arguments in addition to the input
arguments in previous syntaxes. For example,
dlY
= focalCrossEntropy(___,Name,Value
)'TargetCategories','independent'
computes the cross-entropy loss for a
multi-label classification task.
focalLossLayer
| crossentropy
(Deep Learning Toolbox) | mse
(Deep Learning Toolbox) | sigmoid
(Deep Learning Toolbox) | softmax
(Deep Learning Toolbox)