class_docstr: FlashBaseFinetuning can be used to create a custom Flash Finetuning Callback.
class_docstr_tok: ["FlashBaseFinetuning","can","be","used","to","create","a","custom","Flash","Finetuning","Callback","."]
code: def unfreeze_and_extend_param_group(
      self,
      modules: Union[Module, Iterable[Union[Module, Iterable]]],
      optimizer: Optimizer,
      train_bn: bool = True,
  ) -> None:
      self.make_trainable(modules)
  
      params = self.filter_params(
          modules, train_bn=train_bn, requires_grad=True
      )
      params = self.filter_on_optimizer(optimizer, params)
      if params:
          optimizer.param_groups[0]["params"].extend(params)
  
imports: import os
  from functools import partial
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  from pytorch_lightning import LightningModule
  from pytorch_lightning.callbacks import BaseFinetuning
  from torch.nn import Module
  from torch.optim import Optimizer
  from flash.core.registry import FlashRegistry
label_desc: Use image node_id 4 for calling the FlashBaseFinetuning obj's underlying member method code with example usage: obj.unfreeze_and_extend_param_group(modules, optimizer, train_bn) without return types