class_docstr: X3D head.
  This layer performs a fully-connected projection during training, when the
  input size is 1x1x1. It performs a convolutional projection during testing
  when the input size is larger than 1x1x1. If the inputs are from multiple
  different pathways, the inputs will be concatenated after pooling.
class_docstr_tok: ["X3D","head",".","This","layer","performs","a","fully-connected","projection","during","training",",","when","the","input","size","is","1x1x1",".","It","performs","a","convolutional","projection","during","testing","when","the","input","size","is","larger","than","1x1x1",".","If","the","inputs","are","from","multiple","different","pathways",",","the","inputs","will","be","concatenated","after","pooling","."]
code: def forward(self, inputs):
      # In its current design the X3D head is only useable for a single
      # pathway input.
      assert len(inputs) == 1, "Input tensor does not contain 1 pathway"
      x = self.conv_5(inputs[0])
      x = self.conv_5_bn(x)
      x = self.conv_5_relu(x)
      x = self.avg_pool(x)
  
      x = self.lin_5(x)
      if self.bn_lin5_on:
          x = self.lin_5_bn(x)
      x = self.lin_5_relu(x)
  
      # (N, C, T, H, W) -> (N, T, H, W, C).
      x = x.permute((0, 2, 3, 4, 1))
      # Perform dropout.
      if hasattr(self, "dropout"):
          x = self.dropout(x)
      x = self.projection(x)
  
      # Performs fully convlutional inference.
      if not self.training:
          x = self.act(x)
          x = x.mean([1, 2, 3])
  
      x = x.view(x.shape[0], -1)
      return x
  
imports: from functools import partial
  import torch
  import torch.nn
  from detectron2.layers import ROIAlign
  import slowfast.utils.logging
  from slowfast.models.attention import MultiScaleBlock
  from slowfast.models.batchnorm_helper import NaiveSyncBatchNorm1d
  from slowfast.models.nonlocal_helper import Nonlocal
label_desc: Use image node_id 3 for calling the X3DHead obj's underlying member method code with example usage: obj.forward(inputs) and returns: x