class_docstr: Bahdanau Attention with various optional modifications. Proposed below.
  - Location sensitive attnetion: https://arxiv.org/abs/1712.05884
  - Forward Attention: https://arxiv.org/abs/1807.06736 + state masking at inference
  - Using sigmoid instead of softmax normalization
  - Attention windowing at inference time
  
  Note:
      Location Sensitive Attention is an attention mechanism that extends the additive attention mechanism
  to use cumulative attention weights from previous decoder time steps as an additional feature.
  
      Forward attention considers only the alignment paths that satisfy the monotonic condition at each
  decoder timestep. The modified attention probabilities at each timestep are computed recursively
  using a forward algorithm.
  
      Transition agent for forward attention is further proposed, which helps the attention mechanism
  to make decisions whether to move forward or stay at each decoder timestep.
  
      Attention windowing applies a sliding windows to time steps of the input tensor centering at the last
  time step with the largest attention weight. It is especially useful at inference to keep the attention
  alignment diagonal.
  
  
  Args:
      query_dim (int): number of channels in the query tensor.
      embedding_dim (int): number of channels in the vakue tensor. In general, the value tensor is the output of the encoder layer.
      attention_dim (int): number of channels of the inner attention layers.
      location_attention (bool): enable/disable location sensitive attention.
      attention_location_n_filters (int): number of location attention filters.
      attention_location_kernel_size (int): filter size of location attention convolution layer.
      windowing (int): window size for attention windowing. if it is 5, for computing the attention, it only considers the time steps [(t-5), ..., (t+5)] of the input.
      norm (str): normalization method applied to the attention weights. 'softmax' or 'sigmoid'
      forward_attn (bool): enable/disable forward attention.
      trans_agent (bool): enable/disable transition agent in the forward attention.
      forward_attn_mask (int): enable/disable an explicit masking in forward attention. It is useful to set at especially inference time.
code: def apply_forward_attention(self, alignment):
      # forward attention
      fwd_shifted_alpha = F.pad(
          self.alpha[:, :-1].clone().to(alignment.device), (1, 0, 0, 0)
      )
      # compute transition potentials
      alpha = (
          (1 - self.u) * self.alpha + self.u * fwd_shifted_alpha + 1e-8
      ) * alignment
      # force incremental alignment
      if not self.training and self.forward_attn_mask:
          _, n = fwd_shifted_alpha.max(1)
          val, _ = alpha.max(1)
          for b in range(alignment.shape[0]):
              alpha[b, n[b] + 3 :] = 0
              alpha[
                  b, : (n[b] - 1)
              ] = 0  # ignore all previous states to prevent repetition.
              alpha[b, (n[b] - 2)] = (
                  0.01 * val[b]
              )  # smoothing factor for the prev step
      # renormalize attention weights
      alpha = alpha / alpha.sum(dim=1, keepdim=True)
      return alpha
  
imports: import torch
  from torch import nn
  from torch.nn import functional
  from TTS.tts.layers.common_layers import Linear
  from scipy.stats import betabinom
label_desc: Use image node_id 11 for calling the OriginalAttention obj's underlying member method code with example usage: obj.apply_forward_attention(alignment) and returns: alpha