备注
您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程、迁移教程以及更新日志。
mmcls.models.AsymmetricLoss¶
- class mmcls.models.AsymmetricLoss(gamma_pos=0.0, gamma_neg=4.0, clip=0.05, reduction='mean', loss_weight=1.0, use_sigmoid=True, eps=1e-08)[源代码]¶
asymmetric loss.
- 参数
gamma_pos (float) – positive focusing parameter. Defaults to 0.0.
gamma_neg (float) – Negative focusing parameter. We usually set gamma_neg > gamma_pos. Defaults to 4.0.
clip (float, optional) – Probability margin. Defaults to 0.05.
reduction (str) – The method used to reduce the loss into a scalar.
loss_weight (float) – Weight of loss. Defaults to 1.0.
use_sigmoid (bool) – Whether the prediction uses sigmoid instead of softmax. Defaults to True.
eps (float) – The minimum value of the argument of logarithm. Defaults to 1e-8.