class_docstr: Length Adaptor PostEncoder.
docstr: Forward.
docstr_tok: ["Forward","."]
code: def forward(
      self, input: torch.Tensor, input_lengths: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """Forward."""
      if input.size(1) < self.length_adaptor_ratio:
          raise TooShortUttError(
              f"has {input.size(1)} frames and is too short for subsampling "
              + f"(it needs at least {self.length_adaptor_ratio} frames), "
              + "return empty results",
              input.size(1),
              self.length_adaptor_ratio,
          )
  
      if self.embed is not None:
          input = self.embed(input)
  
      input = input.permute(0, 2, 1)
      input = self.length_adaptor(input)
      input = input.permute(0, 2, 1)
  
      input_lengths = (
          input_lengths.float()
          .div(self.length_adaptor_ratio)
          .floor()
          .long()
      )
  
      return input, input_lengths
  
file_path: espnet/espnet2/asr/postencoder/length_adaptor_postencoder.py
imports: from typing import Optional, Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.asr.postencoder.abs_postencoder import AbsPostEncoder
  from espnet.nets.pytorch_backend.transformer.subsampling import TooShortUttError
label_desc: Use image node_id 2 for calling the LengthAdaptorPostEncoder obj's underlying member method code with example usage: obj.forward(input, input_lengths) and returns: input,  input_lengths