Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 640 Bytes

README.md

File metadata and controls

23 lines (14 loc) · 640 Bytes

Learning ReLoss

Taking image classification (ImageNet) as an example.

  • Install diffsort

    pip install diffsort
  • Prepare model predictions and labels

    Train a model (we use ResNet-50 in the paper) using CELoss from scratch, and write additional code to store the predicted logits and labels on ImageNet training set during training.

  • Train reloss

    Modify the code in train_reloss.py to load the stored predictions and labels. Then run

    python train_reloss.py

The best checkpoint would be stored in ./loss_module_best.ckpt .