(Optional) CORAL Loss
Last updated
Last updated
Consistant Rank Ligist for Ordinal Regression
After the last fully-connected layer with num of classes as one, a 1D linear bias layer is introduced.
Let denote the weight parameters of the neural network excluding the bias units of the final layer. The penultimate layer, whose output is denoted as , shares a single weight with all nodes in the final output layer. independent bias units are then added to such that are the inputs to the crresponding binary classifiers in the final layer. Let be the logistic sigmoid function. The predicted empirical probability for task k is defined as:
For model training, we minimize the loss function:
which is the weighted cross-entropy of K-1 binary classifiers. For rank prediction, the binary labels are obtained via:
Let's take a look at the labels, for 7 ranks:
During training, the loss for the current sample is calculated as
Last fc layer outputs (num_classes-1)*2
logits.
Final output is similar to CORAL-loss:
Cross-Entropy, the one hot encoded label for class 3 is denoted as ,
CROAL-Loss, it's
The logits for CORAL-loss looks like this , we find the last num >= 0.5, it's index 3 is our prediction.