mmsegmentation/mmseg
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
..
apis [Enchance] Set a random seed when the user does not set a seed. (#1039) 2021-11-26 10:55:15 +08:00
core [Fix] Change `self.loss_decode` back to `dict` in Single Loss situation. (#1002) 2021-11-01 15:28:37 +08:00
datasets [Feature] Add Cutout transform (#1022) 2021-11-30 20:37:06 +08:00
models [Feature] Add focal loss (#1024) 2021-12-03 00:18:40 -08:00
ops [Dcos] Add header for files (#796) 2021-08-16 23:16:55 -07:00
utils [Dcos] Add header for files (#796) 2021-08-16 23:16:55 -07:00
__init__.py [Fix] Change the upper version of mmcv to 1.5.0 #1096 2021-12-01 21:16:23 +08:00
version.py Bump v0.19.0 (#1009) 2021-11-03 05:27:20 +08:00