class_docstr: This class applies the `FeedForward` to each item in sequences.
  
  Registered as a `Seq2SeqEncoder` with name "feedforward".
docstr: # Parameters
  
  inputs : `torch.Tensor`, required.
      A tensor of shape (batch_size, timesteps, input_dim)
  mask : `torch.BoolTensor`, optional (default = `None`).
      A tensor of shape (batch_size, timesteps).
  
  # Returns
  
  A tensor of shape (batch_size, timesteps, output_dim).
code: def forward(
      self, inputs: torch.Tensor, mask: torch.BoolTensor = None
  ) -> torch.Tensor:
      """
      # Parameters
  
      inputs : `torch.Tensor`, required.
          A tensor of shape (batch_size, timesteps, input_dim)
      mask : `torch.BoolTensor`, optional (default = `None`).
          A tensor of shape (batch_size, timesteps).
  
      # Returns
  
      A tensor of shape (batch_size, timesteps, output_dim).
      """
      if mask is None:
          return self._feedforward(inputs)
      else:
          outputs = self._feedforward(inputs)
          return outputs * mask.unsqueeze(dim=-1)
  
file_path: allennlp/allennlp/modules/seq2seq_encoders/feedforward_encoder.py
imports: import torch
  from allennlp.modules.feedforward import FeedForward
  from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder
label_desc: Use image node_id 5 for calling the FeedForwardEncoder obj's underlying member method code with example usage: obj.forward(inputs, mask) and returns: self, unknown