class_docstr: Head for sentence-level classification tasks.
docstr: hidden_states: (B, S, D) if batch_first else (S, B, D)
docstr_tok: ["hidden_states",":","(","B",",","S",",","D",")","if","batch_first","else","(","S",",","B",",","D",")"]
code: def forward(self, hidden_states, key_padding_mask=None, **kwargs):
      """
      hidden_states: (B, S, D) if batch_first else (S, B, D)
      """
      hidden_states = pooling(
          hidden_states,
          pooling_mode=self.pooling_mode,
          key_padding_mask=key_padding_mask,
          batch_first=self.batch_first,
      )
      hidden_states = self.out_proj(hidden_states)
      return hidden_states
  
imports: import math
  from functools import partial
  from collections import namedtuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.modules.utils import _pair
  import hydra
  from einops import reduce, rearrange
label_desc: Use image node_id 2 for calling the ClassificationHeadLinear obj's underlying member method code with example usage: obj.forward(hidden_states, key_padding_mask) and returns: hidden_states