PyTorch implementation of Anchor Loss: Modulating loss scale based on prediction difficulty, Serim Ryou, Seong-Gyun Jeong, Pietro Perona, ICCV 2019
This code provides anchor loss on image classification. To train the model with anchor loss, include anchor_loss.py
and call the AnchorLoss()
function.
from anchor_loss import AnchorLoss
gamma = 0.5
slack = 0.05
anchor = 'neg'
warm_up = False
criterion = AnchorLoss(gamma, slack, anchor, warm_up)
The default parameter settings are shown above. Details about the parameters are explained in the anchor_loss.py
.
If you use this code, please cite it:
@InProceedings{Ryou_2019_ICCV,
author = {Ryou, Serim and Jeong, Seong-Gyun and Perona, Pietro},
title = {Anchor Loss: Modulating Loss Scale Based on Prediction Difficulty},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {October},
year = {2019}
}