Skip to content
Snippets Groups Projects
Commit 07cd6c98 authored by Rockey's avatar Rockey Committed by GitHub
Browse files

[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: default avatarJunjun2016 <hejunjun@sjtu.edu.cn>

* update test_focal_loss.py

* modified the implementation

* Update mmseg/models/losses/focal_loss.py

Co-authored-by: default avatarJerry Jiarui XU <xvjiarui0826@gmail.com>

* update focal_loss.py

Co-authored-by: default avatarJunjun2016 <hejunjun@sjtu.edu.cn>
Co-authored-by: default avatarJerry Jiarui XU <xvjiarui0826@gmail.com>
parent 504a5c6b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment