class_docstr: Reduces the sequence dimension of an input tensor according to the specified reduce_mode.  Any additional
  kwargs are passed on to the reduce mode's constructor.  If using reduce_mode=="attention", the input_size kwarg
  must also be specified.
  
  A sequence is a tensor of 2 or more dimensions, where the shape is [batch size x sequence length x ...].
  
  :param reduce_mode: The reduction mode, one of {"last", "sum", "mean", "max", "concat", "attention", "none"}
  :param max_sequence_length The maximum sequence length.  Only used for computation of shapes - inputs passed
                             at runtime may have a smaller sequence length.
  :param encoding_size The size of each sequence element/embedding vector, or None if input is a sequence of scalars.
docstr: Forward pass of reducer.
  
  :param inputs: A tensor of 2 or more dimensions, where the shape is [batch size x sequence length x ...].
  :param mask: A mask tensor of 2 dimensions [batch size x sequence length].  Not yet implemented.
  
  :return: The input after applying the reduction operation to sequence dimension.
docstr_tok: ["Forward","pass","of","reducer",".",":","param","inputs",":","A","tensor","of","2","or","more","dimensions",",","where","the","shape","is","[","batch","size","x","sequence","length","x","...","]",".",":","param","mask",":","A","mask","tensor","of","2","dimensions","[","batch","size","x","sequence","length","]",".","Not","yet","implemented",".",":","return",":","The","input","after","applying","the","reduction","operation","to","sequence","dimension","."]
code: def forward(self, inputs, mask=None):
      """Forward pass of reducer.
  
      :param inputs: A tensor of 2 or more dimensions, where the shape is [batch size x sequence length x ...].
      :param mask: A mask tensor of 2 dimensions [batch size x sequence length].  Not yet implemented.
  
      :return: The input after applying the reduction operation to sequence dimension.
      """
      return self._reduce_obj(inputs, mask=mask)
  
imports: import logging
  import torch
  from ludwig.modules.attention_modules import FeedForwardAttentionReducer
  from ludwig.utils.misc_utils import get_from_registry
  from ludwig.utils.torch_utils import LudwigModule, sequence_length_3D
label_desc: Use image node_id 2 for calling the SequenceReducer obj's underlying member method code with example usage: obj.forward(inputs, mask) and returns: self