code: def _fine_tune_layers(self):
      if self.additional_layers_to_train < 0:
          raise ValueError(
              "additional_layers_to_train has to be non-negative: {} found".format(
                  self.additional_layers_to_train
              )
          )
      # base_model contains the real model to fine tune
      children = list(self.model.base_model.children())
      added_layer, cur_layer = 0, -1
      while (
          added_layer < self.additional_layers_to_train
          and -cur_layer < len(children)
      ):
          tunable = False
          for p in children[cur_layer].parameters():
              p.requires_grad = True
              tunable = True
          # only tune those layers contain parameters
          if tunable:
              added_layer += 1
          cur_layer -= 1
  
file_path: SynapseML/deep-learning/src/main/python/synapse/ml/dl/LitDeepTextModel.py
imports: import inspect
  import pytorch_lightning
  import torch
  import torch.nn.functional
  import torch.optim
  from pytorch_lightning.utilities import _module_available
label_desc: Use image node_id 5 for calling the LitDeepTextModel obj's underlying member method code with example usage: obj._fine_tune_layers() without return types