code: def __init__(self, h, d_model, dropout=0.1, compress_attention=False):
      super(MultiHeadedAttention, self).__init__()
      assert d_model % h == 0
      self.d_k = d_model // h
      self.h = h
      self.linears = clones(nn.Linear(d_model, d_model), 4)
      self.attn = None
      self.dropout = nn.Dropout(p=dropout, mode="downscale_in_infer")
      self.compress_attention = compress_attention
      self.compress_attention_linear = nn.Linear(h, 1)
  
imports: import copy
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 1 to create a new MultiHeadedAttention object from inherited base classes: nn with example: obj = MultiHeadedAttention(h, d_model, dropout, compress_attention)