class_docstr: Acoustic model used in *wav2vec 2.0* :cite:`baevski2020wav2vec`.
  
  Note:
      To build the model, please use one of the factory functions.
  
  See Also:
      * :class:`torchaudio.pipelines.Wav2Vec2Bundle`: Pretrained models (without fine-tuning)
      * :class:`torchaudio.pipelines.Wav2Vec2ASRBundle`: ASR pipelines with pretrained models.
  
  Args:
      feature_extractor (torch.nn.Module):
          Feature extractor that extracts feature vectors from raw audio Tensor.
  
      encoder (torch.nn.Module):
          Encoder that converts the audio features into the sequence of probability
          distribution (in negative log-likelihood) over labels.
  
      aux (torch.nn.Module or None, optional):
          Auxiliary module. If provided, the output from encoder is passed to this module.
class_docstr_tok: ["Acoustic","model","used","in","*","wav2vec","2.0","*",":","cite",":","`","baevski2020wav2vec","`",".","Note",":","To","build","the","model",",","please","use","one","of","the","factory","functions",".","See","Also",":","*",":","class",":","`","torchaudio.pipelines.Wav2Vec2Bundle","`",":","Pretrained","models","(","without","fine-tuning",")","*",":","class",":","`","torchaudio.pipelines.Wav2Vec2ASRBundle","`",":","ASR","pipelines","with","pretrained","models",".","Args",":","feature_extractor","(","torch.nn.Module",")",":","Feature","extractor","that","extracts","feature","vectors","from","raw","audio","Tensor",".","encoder","(","torch.nn.Module",")",":","Encoder","that","converts","the","audio","features","into","the","sequence","of","probability","distribution","(","in","negative","log-likelihood",")","over","labels",".","aux","(","torch.nn.Module","or","None",",","optional",")",":","Auxiliary","module",".","If","provided",",","the","output","from","encoder","is","passed","to","this","module","."]
docstr: Compute the sequence of probability distribution over labels.
  
  Args:
      waveforms (Tensor): Audio tensor of shape `(batch, frames)`.
      lengths (Tensor or None, optional):
          Indicates the valid length of each audio in the batch.
          Shape: `(batch, )`.
          When the ``waveforms`` contains audios with different durations,
          by providing ``lengths`` argument, the model will compute
          the corresponding valid output lengths and apply proper mask in
          transformer attention layer.
          If ``None``, it is assumed that all the audio in ``waveforms``
          have valid length. Default: ``None``.
  
  Returns:
      (Tensor, Optional[Tensor]):
      Tensor
          The sequences of probability distribution (in logit) over labels.
          Shape: `(batch, frames, num labels)`.
      Tensor or None
          If ``lengths`` argument was provided, a Tensor of shape `(batch, )`
          is returned.
          It indicates the valid length in time axis of the output Tensor.
docstr_tok: ["Compute","the","sequence","of","probability","distribution","over","labels",".","Args",":","waveforms","(","Tensor",")",":","Audio","tensor","of","shape","`","(","batch",",","frames",")","`",".","lengths","(","Tensor","or","None",",","optional",")",":","Indicates","the","valid","length","of","each","audio","in","the","batch",".","Shape",":","`","(","batch",",",")","`",".","When","the","``","waveforms","``","contains","audios","with","different","durations",",","by","providing","``","lengths","``","argument",",","the","model","will","compute","the","corresponding","valid","output","lengths","and","apply","proper","mask","in","transformer","attention","layer",".","If","``","None","``",",","it","is","assumed","that","all","the","audio","in","``","waveforms","``","have","valid","length",".","Default",":","``","None","``",".","Returns",":","(","Tensor",",","Optional","[","Tensor","]",")",":","Tensor","The","sequences","of","probability","distribution","(","in","logit",")","over","labels",".","Shape",":","`","(","batch",",","frames",",","num","labels",")","`",".","Tensor","or","None","If","``","lengths","``","argument","was","provided",",","a","Tensor","of","shape","`","(","batch",",",")","`","is","returned",".","It","indicates","the","valid","length","in","time","axis","of","the","output","Tensor","."]
code: def forward(
      self,
      waveforms: Tensor,
      lengths: Optional[Tensor] = None,
  ) -> Tuple[Tensor, Optional[Tensor]]:
      """Compute the sequence of probability distribution over labels.
  
      Args:
          waveforms (Tensor): Audio tensor of shape `(batch, frames)`.
          lengths (Tensor or None, optional):
              Indicates the valid length of each audio in the batch.
              Shape: `(batch, )`.
              When the ``waveforms`` contains audios with different durations,
              by providing ``lengths`` argument, the model will compute
              the corresponding valid output lengths and apply proper mask in
              transformer attention layer.
              If ``None``, it is assumed that all the audio in ``waveforms``
              have valid length. Default: ``None``.
  
      Returns:
          (Tensor, Optional[Tensor]):
          Tensor
              The sequences of probability distribution (in logit) over labels.
              Shape: `(batch, frames, num labels)`.
          Tensor or None
              If ``lengths`` argument was provided, a Tensor of shape `(batch, )`
              is returned.
              It indicates the valid length in time axis of the output Tensor.
      """
      x, lengths = self.feature_extractor(waveforms, lengths)
      x = self.encoder(x, lengths)
      if self.aux is not None:
          x = self.aux(x)
      return x, lengths
  
imports: import math
  from typing import List, Optional, Tuple
  import torch
  from torch import Tensor
  from torch.nn import Module
  from .None import components
label_desc: Use image node_id 3 for calling the Wav2Vec2Model obj's underlying member method code with example usage: obj.forward(waveforms, lengths) and returns: x,  lengths