transformer_rankers.models.losses.label_smoothing

Classes

LabelSmoothingCrossEntropy([smoothing])

Label Smoothing implementation from https://github.com/huanglianghua (https://github.com/pytorch/pytorch/issues/7455).

WeaklySupervisedLabelSmoothingCrossEntropy([…])

Weakly Supervised Label Smoothing replaces the uniform distribution from LS with the weak supervision signal from the negative sampling procedure.