mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
* [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>