class_docstr: Given vector w and token vectors = {t1, t2, ..., t_n}, compute self attention
  weights to weighs the tokens
  * a_j = softmax(w . t_j)
class_docstr_tok: ["Given","vector","w","and","token","vectors","=","{","t1",",","t2",",","...",",","t_n","}",",","compute","self","attention","weights","to","weighs","the","tokens","*","a_j","=","softmax","(","w",".","t_j",")"]
code: def __init__(self, input_dim):
      super().__init__()
      self.linear = nn.Linear(input_dim, 1)
      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 DotProductSelfAttention object from inherited base classes: Module with example: obj = DotProductSelfAttention(input_dim)