Shortcuts

备注

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

mmcls.core.CosineAnnealingCooldownLrUpdaterHook

class mmcls.core.CosineAnnealingCooldownLrUpdaterHook(min_lr=None, min_lr_ratio=None, cool_down_ratio=0.1, cool_down_time=10, **kwargs)[源代码]

Cosine annealing learning rate scheduler with cooldown.

参数
  • min_lr (float, optional) – The minimum learning rate after annealing. Defaults to None.

  • min_lr_ratio (float, optional) – The minimum learning ratio after nnealing. Defaults to None.

  • cool_down_ratio (float) – The cooldown ratio. Defaults to 0.1.

  • cool_down_time (int) – The cooldown time. Defaults to 10.

  • by_epoch (bool) – If True, the learning rate changes epoch by epoch. If False, the learning rate changes iter by iter. Defaults to True.

  • warmup (string, optional) – Type of warmup used. It can be None (use no warmup), ‘constant’, ‘linear’ or ‘exp’. Defaults to None.

  • warmup_iters (int) – The number of iterations or epochs that warmup lasts. Defaults to 0.

  • warmup_ratio (float) – LR used at the beginning of warmup equals to warmup_ratio * initial_lr. Defaults to 0.1.

  • warmup_by_epoch (bool) – If True, the warmup_iters means the number of epochs that warmup lasts, otherwise means the number of iteration that warmup lasts. Defaults to False.

备注

You need to set one and only one of min_lr and min_lr_ratio.

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.