Shortcuts

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.