UnfreezeBackbone
- class lightning_pose.callbacks.UnfreezeBackbone[source]
Bases:
CallbackCallback that ramps up the backbone learning rate from 0 to upsampling_lr on unfreeze_epoch or unfreeze_step.
Starts LR at initial_ratio * upsampling_lr. Grows lr by a factor of warm_up_ratio per epoch or step. Once LR reaches upsampling_lr, keeps it in sync with upsampling_lr.
Use instead of pl.callbacks.BackboneFinetuning in order to use multi-GPU (DDP). See lightning-ai/pytorch-lightning#20340 for context.
Methods Summary
on_train_batch_start(trainer, pl_module, ...)Called when the train batch begins.
Methods Documentation
- on_train_batch_start(trainer, pl_module, batch, batch_idx) None[source]
Called when the train batch begins.
- __init__(unfreeze_epoch: int | None = None, unfreeze_step: int | None = None, initial_ratio=0.1, warm_up_ratio=1.5)[source]
- __new__(**kwargs)