class_docstr: Finetune a backbone model based on a learning rate user-defined scheduling.
  
  When the backbone learning rate reaches the current model learning rate
  and ``should_align`` is set to True, it will align with it for the rest of the training.
  
  Args:
      unfreeze_backbone_at_epoch: Epoch at which the backbone will be unfreezed.
      lambda_func: Scheduling function for increasing backbone learning rate.
      backbone_initial_ratio_lr:
          Used to scale down the backbone learning rate compared to rest of model
      backbone_initial_lr: Optional, Initial learning rate for the backbone.
          By default, we will use ``current_learning /  backbone_initial_ratio_lr``
      should_align: Whether to align with current learning rate when backbone learning
          reaches it.
      initial_denom_lr: When unfreezing the backbone, the initial learning rate will
          ``current_learning_rate /  initial_denom_lr``.
      train_bn: Whether to make Batch Normalization trainable.
      verbose: Display current learning rate for model and backbone
      rounding: Precision for displaying learning rate
  
  Example::
  
      >>> from lightning.pytorch import Trainer
      >>> from lightning.pytorch.callbacks import BackboneFinetuning
      >>> multiplicative = lambda epoch: 1.5
      >>> backbone_finetuning = BackboneFinetuning(200, multiplicative)
      >>> trainer = Trainer(callbacks=[backbone_finetuning])
code: def __init__(
      self,
      unfreeze_backbone_at_epoch: int = 10,
      lambda_func: Callable = multiplicative,
      backbone_initial_ratio_lr: float = 10e-2,
      backbone_initial_lr: Optional[float] = None,
      should_align: bool = True,
      initial_denom_lr: float = 10.0,
      train_bn: bool = True,
      verbose: bool = False,
      rounding: int = 12,
  ) -> None:
      super().__init__()
  
      self.unfreeze_backbone_at_epoch: int = unfreeze_backbone_at_epoch
      self.lambda_func: Callable = lambda_func
      self.backbone_initial_ratio_lr: float = backbone_initial_ratio_lr
      self.backbone_initial_lr: Optional[float] = backbone_initial_lr
      self.should_align: bool = should_align
      self.initial_denom_lr: float = initial_denom_lr
      self.train_bn: bool = train_bn
      self.verbose: bool = verbose
      self.rounding: int = rounding
      self.previous_backbone_lr: Optional[float] = None
  
imports: import logging
  from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Union
  import torch
  from torch.nn import Module, ModuleDict
  from torch.nn.modules.batchnorm import _BatchNorm
  from torch.optim.optimizer import Optimizer
  from typing_extensions import override
  import lightning.pytorch
  from lightning.pytorch.callbacks.callback import Callback
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.rank_zero import rank_zero_warn
label_desc: Use image node_id 1 to create a new BackboneFinetuning object from inherited base classes: BaseFinetuning with example: obj = BackboneFinetuning(unfreeze_backbone_at_epoch, lambda_func, backbone_initial_ratio_lr, backbone_initial_lr, should_align, initial_denom_lr, train_bn, verbose, rounding)