-
- Downloads
[Feature] Add focal loss (#1024)
* [Feature] add focal loss * fix the bug of 'non' reduction type * refine the implementation * add class_weight and ignore_index; support different alpha values for different classes * fixed some bugs * fix bugs * add comments * modify test * Update mmseg/models/losses/focal_loss.py Co-authored-by:Junjun2016 <hejunjun@sjtu.edu.cn> * update test_focal_loss.py * modified the implementation * Update mmseg/models/losses/focal_loss.py Co-authored-by:
Jerry Jiarui XU <xvjiarui0826@gmail.com> * update focal_loss.py Co-authored-by:
Junjun2016 <hejunjun@sjtu.edu.cn> Co-authored-by:
Jerry Jiarui XU <xvjiarui0826@gmail.com>
Showing
- mmseg/models/losses/__init__.py 3 additions, 1 deletionmmseg/models/losses/__init__.py
- mmseg/models/losses/focal_loss.py 327 additions, 0 deletionsmmseg/models/losses/focal_loss.py
- tests/test_models/test_losses/test_focal_loss.py 216 additions, 0 deletionstests/test_models/test_losses/test_focal_loss.py
Loading
Please register or sign in to comment