lonePatient / label_smoothing_pytorch

pytorch implement of Label Smoothing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Label Smoothing Pytorch

This repository contains a PyTorch implementation of the Label Smoothing.

Dependencies

  • PyTorch
  • torchvision
  • matplotlib
  • scikit-learn

Example

To produce th result, we use CIFAR-10 dataset for ResNet18.

# no label smoothing
python run.py

# use label smoothing
python run.py --do_lsr

# extract feature
python generate_feature.py

python generate_feature.py --do_lsr

#----------- plot tsne
python tsne_plot.py

python tsne_plot.py --do_lsr

Results

Training result

TSNE Visualisation

About

pytorch implement of Label Smoothing


Languages

Language:Python 100.0%