项目作者: wangleiofficial

项目描述 :
label smoothing PyTorch implementation
高级语言: Python
项目地址: git://github.com/wangleiofficial/label-smoothing-pytorch.git
创建时间: 2020-11-02T03:04:19Z
项目社区:https://github.com/wangleiofficial/label-smoothing-pytorch

开源协议:MIT License

下载


label smoothing PyTorch implementation

Requirements

  1. pytorch > 1.0

Install

  1. git clone https://github.com/wangleiofficial/label-smoothing-pytorch.git

Usage

  1. import LabelSmoothingCrossEntropy
  2. criterion = LabelSmoothingCrossEntropy(reduction='sum')
  3. loss = criterion(preds, labels)

License

MIT

Citation

Müller, Rafael, Simon Kornblith, and Geoffrey E. Hinton. “When does label smoothing help?.” Advances in Neural Information Processing Systems. 2019.