class_docstr: This function implements a self-attention pooling (https://arxiv.org/abs/2008.01077).
  
  Arguments
  ---------
  input_dim: int
      The dimension of the input Tensor
  
  Example
  -------
  >>> inp_tensor = torch.rand([4, 40])
  >>> pool = AttentionPooling(input_dim=40)
  >>> out_tensor = pool(inp_tensor)
code: def __init__(
      self,
      input_dim,
  ):
      super().__init__()
  
      self.input_dim = input_dim
  
      # Matmul
      self.attn_pooling_w = torch.nn.Linear(input_dim, 1)
  
imports: import torch
  import logging
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new AttentionPooling object from inherited base classes: nn with example: obj = AttentionPooling(input_dim)