code: def __init__(self, dim_in, num_classes, act_func="softmax"):
      super(FullyConvolutionalLinear, self).__init__()
      # Perform FC in a fully convolutional manner. The FC layer will be
      # initialized with a different std comparing to convolutional layers.
      self.projection = nn.Linear(dim_in, num_classes, bias=True)
  
      # Softmax for evaluation and testing.
      if act_func == "softmax":
          self.act = nn.Softmax(dim=4)
      elif act_func == "sigmoid":
          self.act = nn.Sigmoid()
      elif act_func == "identity":
          # for some tasks eg. regression, we don't want an activation function
          self.act = nn.Identity()
      else:
          raise NotImplementedError(
              "{} is not supported as an activation"
              "function.".format(act_func)
          )
  
file_path: ClassyVision/classy_vision/heads/fully_convolutional_linear_head.py
imports: from collections.abc import Sequence
  from typing import Any, Dict, List, Optional
  import torch.nn
  from classy_vision.generic.util import is_pos_int
  from classy_vision.heads import ClassyHead, register_head
label_desc: Use image node_id 1 to create a new FullyConvolutionalLinear object from inherited base classes: nn with example: obj = FullyConvolutionalLinear(dim_in, num_classes, act_func)