Shortcuts

备注

您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程迁移教程以及更新日志

mmcls.models.FocalLoss

class mmcls.models.FocalLoss(gamma=2.0, alpha=0.25, reduction='mean', loss_weight=1.0)[源代码]

Focal loss.

参数
  • gamma (float) – Focusing parameter in focal loss. Defaults to 2.0.

  • alpha (float) – The parameter in balanced form of focal loss. Defaults to 0.25.

  • reduction (str) – The method used to reduce the loss into a scalar. Options are “none” and “mean”. Defaults to ‘mean’.

  • loss_weight (float) – Weight of loss. Defaults to 1.0.

Read the Docs v: latest
Versions
master
latest
1.x
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.