code: def set_parameter_requires_grad(model: nn.Module, exception: str):
      """
      Freeze model parameters, except for the "exception" layer
  
      :param model: (nn.Module) Target model.
      :param exception: (str) The name of the layer that does not need to be frozen.
      :return:
      """
      for name, param in model.named_parameters():
          if exception not in name:
              param.requires_grad = False
  
file_path: BigDL/python/nano/src/bigdl/nano/pytorch/vision/models/_utils.py
imports: from torch import nn
label_desc: Use image node_id 1 for calling a global function with example usage: set_parameter_requires_grad(model, exception) without return types