PyTorch的LabelSmoothing Implementation

Yanwei Liu
Jan 19, 2022

參考資料

本文除了呈現Label Smoothing的程式碼之外,也在以下的gist中,實作了進行Pseudo Labeling時,藉由模型輸出的Softmax output probability當成Threshold,大於特定Threshold的作為較有信心的輸出,並將該輸出設成mask,使mask與Label smoothing得到的loss相乘。

--

--