mmsegmentation/mmseg/models/losses
Rockey 1b41989934
[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>
2021-12-03 00:18:40 -08:00
..
__init__.py [Feature] Add focal loss (#1024) 2021-12-03 00:18:40 -08:00
accuracy.py [Dcos] Add header for files (#796) 2021-08-16 23:16:55 -07:00
cross_entropy_loss.py [Feature] Support multiple losses during training (#818) 2021-09-24 15:08:28 +08:00
dice_loss.py [Feature] Support multiple losses during training (#818) 2021-09-24 15:08:28 +08:00
focal_loss.py [Feature] Add focal loss (#1024) 2021-12-03 00:18:40 -08:00
lovasz_loss.py [Feature] Support multiple losses during training (#818) 2021-09-24 15:08:28 +08:00
utils.py [Enhancement] Add codespell pre-commit hook and fix typos (#920) 2021-10-13 06:21:17 -07:00