code: def get_fc_names(model_name, model_type=ModelType.CLASSIFICATION):
      """
      Look up the name of the FC (fully connected) layer(s) of a model. Typically these are the layers that are replaced when transfer-learning from another model.
      Note that only a handful of models have more than one FC layer. Currently only 'classification' models are supported.
  
      :param model_name: (string)
          name of the model
      :param model_type: (ModelType)
          only classification is supported at this time
  
      :return: list
          names of the FC layers (usually a single one)
      """
  
      if model_type == ModelType.CLASSIFICATION:
          fc_names = [
              "last_linear"
          ]  # most common name of the last layer (to be replaced)
  
          if model_name in torch_models.__dict__:
              if any(
                  x in ["densenet", "squeezenet", "vgg", "efficientnet"]
                  for x in model_name
              ):  # apparently these are different...
                  fc_names = ["classifier"]
              elif any(
                  x in ["inception_v3", "inceptionv3", "Inception3"]
                  for x in model_name
              ):
                  fc_names = ["AuxLogits.fc", "fc"]
              elif any(
                  x in ["swin_", "vit_", "pit_"] for x in model_name
              ):
                  fc_names = ["head", "head_dist"]
              elif any(x in ["nfnet", "gernet"] for x in model_name):
                  fc_names = ["head.fc"]
              else:
                  fc_names = [
                      "fc"
                  ]  # the name of the last layer to be replaced in torchvision models
          ## NOTE NOTE NOTE
          # 'squeezenet' pretrained model weights are saved as ['classifier.1']
          # 'vgg' pretrained model weights are saved as ['classifier.0', 'classifier.3', 'classifier.6']
  
          return fc_names
  
      else:
          return [None]
  
imports: from functools import partial
  from typing import Callable
  from torchvision.models.resnet import Bottleneck
  from .None import classification
  from .segmentation import *
  from .None import segmentation
  from enum import Enum
  from torchvision import models
  from torchvision.models.inception import InceptionAux
  import torch
  import torch.nn
  import os
  import errno
label_desc: Use image node_id 1 for calling a global function with example usage: get_fc_names(model_name, model_type) and returns: fc_names, list