Skip to content
Implementation of "Anchor Loss: Modulating loss scale based on prediction difficulty"
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.txt license Oct 21, 2019
README.md Update README.md Nov 1, 2019
anchor_loss.py logpt_neg correction Nov 22, 2019

README.md

Anchor Loss in PyTorch

PyTorch implementation of Anchor Loss: Modulating loss scale based on prediction difficulty, Serim Ryou, Seong-Gyun Jeong, Pietro Perona, ICCV 2019

Anchor Loss

anchorloss 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}
}
You can’t perform that action at this time.