torch-template-for-deep-learning icon indicating copy to clipboard operation
torch-template-for-deep-learning copied to clipboard

Should be `loss * self.eps/(c-1)`?

Open CiaoHe opened this issue 2 years ago • 1 comments

Hi,

Based on my understanding, the label smooth loss should be constructed like: for the non-target label, the corresponding value should be set as \epsilon / (num_classes-1)

https://github.com/ZhugeKongan/torch-template-for-deep-learning/blob/4a84444066456c7bb27daeec5e85d512eccc88cf/autoaug/label_smoothing.py#L19

So, this line might be correct as loss*self.eps/(c-1)?

CiaoHe avatar Dec 23 '21 05:12 CiaoHe

Yes, thank you for your feedback. There are still many details that need to be continuously improved.

ZhugeKongan avatar Dec 23 '21 06:12 ZhugeKongan