class_docstr: Given sequences P and Q, computes attention weights for each element in P by
  matching Q with each element in P.
  * a_i_j = softmax(p_i . q_j) where softmax is computed by summing over q_j
class_docstr_tok: ["Given","sequences","P","and","Q",",","computes","attention","weights","for","each","element","in","P","by","matching","Q","with","each","element","in","P.","*","a_i_j","=","softmax","(","p_i",".","q_j",")","where","softmax","is","computed","by","summing","over","q_j"]
code: def __init__(self, proj_dim):
      super().__init__()
      self.linear = nn.Linear(proj_dim, proj_dim)
      self.proj_dim = proj_dim
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/representations/attention.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from pytext.models.module import Module
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 2 to create a new SequenceAlignedAttention object from inherited base classes: Module with example: obj = SequenceAlignedAttention(proj_dim)