class_docstr: A deep attention form, invented by Robert:
  u = ReLU(Wx)
  v = ReLU(Wy)
  a = V.(u o v)
class_docstr_tok: ["A","deep","attention","form",",","invented","by","Robert",":","u","=","ReLU","(","Wx",")","v","=","ReLU","(","Wy",")","a","=","V.","(","u","o","v",")"]
code: def __init__(self, dim):
      super(DeepAttention, self).__init__()
      self.linear_in = nn.Linear(dim, dim, bias=False)
      self.linear_v = nn.Linear(dim, 1, bias=False)
      self.linear_out = nn.Linear(dim * 2, dim, bias=False)
      self.relu = nn.ReLU()
      self.sm = nn.Softmax(dim=1)
      self.tanh = nn.Tanh()
      self.mask = None
  
imports: import logging
  import torch
  import torch.nn
  import math
  import numpy
  import stanza.models.common.seq2seq_constant
label_desc: Use image node_id 1 to create a new DeepAttention object from inherited base classes: nn with example: obj = DeepAttention(dim)