code: def __init__(self, num_units, num_heads, keep_prob, is_mask):
      super(Attention, self).__init__()
      self.num_heads = num_heads
      self.keep_prob = keep_prob
  
      self.linear_q = nn.Linear(num_units, num_units)
      self.linear_k = nn.Linear(num_units, num_units)
      self.linear_v = nn.Linear(num_units, num_units)
  
      self.bn = BatchNorm(num_units, True, is_mask)
      self.dropout = nn.Dropout(p=1 - self.keep_prob)
  
imports: import torch
  import torch.nn.functional
  from torch import nn
  from utils import get_length, INF
label_desc: Use image node_id 1 to create a new Attention object from inherited base classes: nn with example: obj = Attention(num_units, num_heads, keep_prob, is_mask)