class_docstr: Multi-Head Attention
docstr: h: number of heads; dim_model: hidden dimension
docstr_tok: ["h",":","number","of","heads",";","dim_model",":","hidden","dimension"]
code: def __init__(self, h, dim_model):
      "h: number of heads; dim_model: hidden dimension"
      super(MultiHeadAttention, self).__init__()
      self.d_k = dim_model // h
      self.h = h
      # W_q, W_k, W_v, W_o
      self.linears = clones(
          nn.Linear(dim_model, dim_model, bias=False), 4
      )
  
file_path: dgl/examples/pytorch/transformer/modules/attention.py
imports: import numpy
  import torch
  import torch.nn
  from .layers import clones
label_desc: Use image node_id 1 to create a new MultiHeadAttention object from inherited base classes: nn with example: obj = MultiHeadAttention(h, dim_model)