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 from_config(cls, config: Config):
      return cls(config.input_dim)
  
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 1 for calling the DotProductSelfAttention obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls