PyTorch implementation of the ordinal triplet loss function detailed in the Interspeech paper.
Ordinal triplet loss (OTL) is a classification loss function that accounts for the relative distance between ordinal classes. The two key techniques used to realize this are soft labels and a modified triplet loss function.
-
To use soft labels only, see the
mk_y_slabs
andslab_predict
functions inslab/utils.py
. For usage examples, seeslab/main.py
. -
To use the ordinal triple loss function, see the
OrdinalTripletLoss
class inotl/utils.py
. For usage examples, seeotl/main.py
.
- Download the challenge data, create a directory called
data
at the same level asbaseline
, and movelabels.csv
and thefeatures
directory intodata
- The
baseline
directory contains instructions on how to run the baseline SVR and MLP models - The
slab
directory contains instructions on how to run an MLP trained with soft labels - The
otl
directory contains instructions on how to run an MLP trained using ordinal triplet loss