Shortcuts

mmcls.models.SeesawLoss

class mmcls.models.SeesawLoss(use_sigmoid=False, p=0.8, q=2.0, num_classes=1000, eps=0.01, reduction='mean', loss_weight=1.0)[源代码]

Implementation of seesaw loss.

Refers to Seesaw Loss for Long-Tailed Instance Segmentation (CVPR 2021)

参数
  • use_sigmoid (bool) – Whether the prediction uses sigmoid of softmax. Only False is supported. Defaults to False.

  • p (float) – The p in the mitigation factor. Defaults to 0.8.

  • q (float) – The q in the compenstation factor. Defaults to 2.0.

  • num_classes (int) – The number of classes. Default to 1000 for the ImageNet dataset.

  • eps (float) – The minimal value of divisor to smooth the computation of compensation factor, default to 1e-2.

  • reduction (str) – The method that reduces the loss to a scalar. Options are “none”, “mean” and “sum”. Default to “mean”.

  • loss_weight (float) – The weight of the 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.