Classification output layer
A classification layer computes the cross entropy loss for multi-class classification problems with mutually exclusive classes.
The layer infers the number of classes from the output size of the previous layer. For example, to specify the number of classes K of the network, include a fully connected layer with output size K and a softmax layer before the classification layer.
creates a classification
layer.layer
= classificationLayer
sets the optional layer
= classificationLayer(Name,Value
)Name
and Classes
properties using name-value pairs. For example,
classificationLayer('Name','output')
creates a classification
layer with the name 'output'
. Enclose each property name in
single quotes.
[1] Bishop, C. M. Pattern Recognition and Machine Learning. Springer, New York, NY, 2006.