class_docstr: Args:
code: def head(self, base_out):
      if self.dropout > 0:
          base_out = self.new_fc(base_out)
  
      if not self.before_softmax:
          base_out = self.softmax(base_out)
      if self.reshape:
          if self.is_shift and self.temporal_pool:
              base_out = base_out.view(
                  (-1, self.num_segments // 2) + base_out.size()[1:]
              )
          else:
              base_out = base_out.view(
                  (-1, self.num_segments) + base_out.size()[1:]
              )
          output = self.consensus(base_out)
          return output.squeeze(1)
  
imports: import torch
  from torch import nn
  from torch.nn.init import normal_, constant_
  import numpy
  import torchvision
  from towhee.models.utils.basic_ops import ConsensusModule
  from towhee.models.layers.non_local import make_non_local
  from towhee.models.tsm.mobilenet_v2 import mobilenet_v2, InvertedResidual
  from towhee.models.tsm.temporal_shift import TemporalShift, make_temporal_shift
  from towhee.models.tsm.config import _C
label_desc: Use image node_id 5 for calling the TSN obj's underlying member method code with example usage: obj.head(base_out) and returns: output