class_docstr: Aligner Network for learning alignment between the input text and the model output with Gaussian Attention.
  
  ::
  
      query -> conv1d -> relu -> conv1d -> relu -> conv1d -> L2_dist -> softmax -> alignment
      key   -> conv1d -> relu -> conv1d -----------------------^
  
  Args:
      in_query_channels (int): Number of channels in the query network. Defaults to 80.
      in_key_channels (int): Number of channels in the key network. Defaults to 512.
      attn_channels (int): Number of inner channels in the attention layers. Defaults to 80.
      temperature (float): Temperature for the softmax. Defaults to 0.0005.
code: def __init__(
      self,
      in_query_channels=80,
      in_key_channels=512,
      attn_channels=80,
      temperature=0.0005,
  ):
      super().__init__()
      self.temperature = temperature
      self.softmax = torch.nn.Softmax(dim=3)
      self.log_softmax = torch.nn.LogSoftmax(dim=3)
  
      self.key_layer = nn.Sequential(
          nn.Conv1d(
              in_key_channels,
              in_key_channels * 2,
              kernel_size=3,
              padding=1,
              bias=True,
          ),
          torch.nn.ReLU(),
          nn.Conv1d(
              in_key_channels * 2,
              attn_channels,
              kernel_size=1,
              padding=0,
              bias=True,
          ),
      )
  
      self.query_layer = nn.Sequential(
          nn.Conv1d(
              in_query_channels,
              in_query_channels * 2,
              kernel_size=3,
              padding=1,
              bias=True,
          ),
          torch.nn.ReLU(),
          nn.Conv1d(
              in_query_channels * 2,
              in_query_channels,
              kernel_size=1,
              padding=0,
              bias=True,
          ),
          torch.nn.ReLU(),
          nn.Conv1d(
              in_query_channels,
              attn_channels,
              kernel_size=1,
              padding=0,
              bias=True,
          ),
      )
  
      self.init_layers()
  
imports: from typing import Tuple
  import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new AlignmentNetwork object from inherited base classes: torch.nn with example: obj = AlignmentNetwork(in_query_channels, in_key_channels, attn_channels, temperature)