def __init__(
        self,
        strategy_key: Union[str, FinetuningStrategies],
        strategy_metadata: Optional[Union[int, Tuple[Tuple[int, int], int]]] = None,
        train_bn: bool = True,
    ):
        """
        Args:
            strategy_key: The finetuning strategy to be used. See :meth:`~flash.core.trainer.Trainer.finetune`
                for the available strategies.
            strategy_metadata: Data that accompanies certain finetuning strategies like epoch number or number of
                layers.
            train_bn: Whether to train Batch Norm layer
        """
        super().__init__()

        self.strategy: FinetuningStrategies = strategy_key
        self.strategy_metadata: Optional[Union[int, Tuple[Tuple[int, int], int]]] = strategy_metadata
        self.train_bn: bool = train_bn

        if self.strategy == FinetuningStrategies.FREEZE_UNFREEZE and not isinstance(self.strategy_metadata, int):
            raise TypeError(
                "The `freeze_unfreeze` strategy requires an integer denoting the epoch number to unfreeze at. Example: "
                "`strategy=('freeze_unfreeze', 7)`"
            )
        if self.strategy == FinetuningStrategies.UNFREEZE_MILESTONES and not (
            isinstance(self.strategy_metadata, Tuple)
            and isinstance(self.strategy_metadata[0], Tuple)
            and isinstance(self.strategy_metadata[1], int)
            and isinstance(self.strategy_metadata[0][0], int)
            and isinstance(self.strategy_metadata[0][1], int)
        ):
            raise TypeError(
                "The `unfreeze_milestones` strategy requires the format Tuple[Tuple[int, int], int]. Example: "
                "`strategy=('unfreeze_milestones', ((5, 10), 15))`"
            )

        Args:
            strategy_key: The finetuning strategy to be used. See :meth:`~flash.core.trainer.Trainer.finetune`
                for the available strategies.
            strategy_metadata: Data that accompanies certain finetuning strategies like epoch number or number of
                layers.
            train_bn: Whether to train Batch Norm layer
        
src/flash/core/finetuning.py