class_docstr: Alignment Learning Framework proposed for parallel TTS models in:
  
  https://arxiv.org/abs/2108.10447
class_docstr_tok: ["Alignment","Learning","Framework","proposed","for","parallel","TTS","models","in",":","https",":","\/\/arxiv.org\/abs\/2108.10447"]
docstr: Initialize AlignmentModule.
  
  Args:
      adim (int): Dimension of attention.
      odim (int): Dimension of feats.
      cache_prior (bool): Whether to cache beta-binomial prior.
docstr_tok: ["Initialize","AlignmentModule",".","Args",":","adim","(","int",")",":","Dimension","of","attention",".","odim","(","int",")",":","Dimension","of","feats",".","cache_prior","(","bool",")",":","Whether","to","cache","beta-binomial","prior","."]
code: def __init__(self, adim, odim, cache_prior=True):
      """Initialize AlignmentModule.
  
      Args:
          adim (int): Dimension of attention.
          odim (int): Dimension of feats.
          cache_prior (bool): Whether to cache beta-binomial prior.
  
      """
      super().__init__()
      self.cache_prior = cache_prior
      self._cache = {}
  
      self.t_conv1 = nn.Conv1d(adim, adim, kernel_size=3, padding=1)
      self.t_conv2 = nn.Conv1d(adim, adim, kernel_size=1, padding=0)
  
      self.f_conv1 = nn.Conv1d(odim, adim, kernel_size=3, padding=1)
      self.f_conv2 = nn.Conv1d(adim, adim, kernel_size=3, padding=1)
      self.f_conv3 = nn.Conv1d(adim, adim, kernel_size=1, padding=0)
  
file_path: espnet/espnet2/gan_tts/jets/alignments.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from numba import jit
  from scipy.stats import betabinom
label_desc: Use image node_id 1 to create a new AlignmentModule object from inherited base classes: nn with example: obj = AlignmentModule(adim, odim, cache_prior)