docstr: Computes the output length of the convolutional layers
docstr_tok: ["Computes","the","output","length","of","the","convolutional","layers"]
code: def _get_feat_extract_output_lengths(
      self,
      input_lengths: Union[jnp.ndarray, int],
      add_adapter: Optional[bool] = None,
  ):
      """
      Computes the output length of the convolutional layers
      """
  
      add_adapter = (
          self.config.encoder.add_adapter
          if add_adapter is None
          else add_adapter
      )
  
      def _conv_out_length(input_length, kernel_size, stride):
          # 1D convolutional layer output length formula taken
          # from https://pytorch.org/docs/stable/generated/torch.nn.Conv1d.html
          return (input_length - kernel_size) // stride + 1
  
      for kernel_size, stride in zip(
          self.config.encoder.conv_kernel,
          self.config.encoder.conv_stride,
      ):
          input_lengths = _conv_out_length(
              input_lengths, kernel_size, stride
          )
  
      if add_adapter:
          for _ in range(self.config.encoder.num_adapter_layers):
              input_lengths = _conv_out_length(
                  input_lengths, 1, self.config.encoder.adapter_stride
              )
  
      return input_lengths
  
imports: import os
  from typing import Optional, Tuple, Union
  import flax.linen
  import jax
  import jax.numpy
  from flax.core.frozen_dict import FrozenDict, freeze, unfreeze
  from flax.traverse_util import flatten_dict, unflatten_dict
  from jax import lax
  from jax.random import PRNGKey
  from ...modeling_flax_outputs import FlaxBaseModelOutput, FlaxCausalLMOutputWithCrossAttentions, FlaxSeq2SeqLMOutput
  from ...modeling_flax_utils import FlaxPreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from ..auto.configuration_auto import AutoConfig
  from ..auto.modeling_flax_auto import FlaxAutoModel, FlaxAutoModelForCausalLM
  from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig
label_desc: Use image node_id 2 for calling the FlaxSpeechEncoderDecoderModule obj's underlying member method code with example usage: obj._get_feat_extract_output_lengths(input_lengths, add_adapter) and returns: input_lengths, unknown