mmpretrain/mmcls/models/losses
HumberMe 1214df083d
[Enhance] Use PyTorch official `one_hot` to implement `convert_to_one_hot`. (#696)
* some change to mmcls/models/losses/utils.py:convert_to_one_hot()

* fixed problem: line too long

* fixed wrong output shape

* fixed lint PEP8 E128

* fix lint

* fix lint

* add unit tests

Co-authored-by: Ezra-Yu <1105212286@qq.com>
2022-02-28 10:20:31 +08:00
..
__init__.py [Feature] Add seesaw loss. (#500) 2021-10-27 10:11:59 +08:00
accuracy.py [Fix] Fix cal_acc bug caused by the return type of accuracy. 2021-12-14 16:21:25 +08:00
asymmetric_loss.py [Enhance] Support single-label, softmax, custom eps by asymmetric loss (#609) 2022-01-21 11:35:14 +08:00
cross_entropy_loss.py [Feature] Support positive weights in BCE. (#516) 2021-11-10 17:14:12 +08:00
focal_loss.py [Enhance] Focal loss for single label tasks (#548) 2021-11-26 12:36:49 +08:00
label_smooth_loss.py [Refactor] Remove deprecation. (#633) 2022-02-10 09:30:18 +08:00
seesaw_loss.py [Feature] Add seesaw loss. (#500) 2021-10-27 10:11:59 +08:00
utils.py [Enhance] Use PyTorch official `one_hot` to implement `convert_to_one_hot`. (#696) 2022-02-28 10:20:31 +08:00