code: def __init__(self, nhid, nhead=10, head_dim=10, dropout=0.1):
      super(_MSA1, self).__init__()
      # Multi-head Self Attention Case 1, doing self-attention for small regions
      # Due to the architecture of GPU, using hadamard production and summation are faster than dot production when unfold_size is very small
      self.WQ = nn.Conv2d(nhid, nhead * head_dim, 1)
      self.WK = nn.Conv2d(nhid, nhead * head_dim, 1)
      self.WV = nn.Conv2d(nhid, nhead * head_dim, 1)
      self.WO = nn.Conv2d(nhead * head_dim, nhid, 1)
  
      self.drop = nn.Dropout(dropout)
  
      # print('NUM_HEAD', nhead, 'DIM_HEAD', head_dim)
      self.nhid, self.nhead, self.head_dim, self.unfold_size = (
          nhid,
          nhead,
          head_dim,
          3,
      )
  
file_path: fastNLP/fastNLP/modules/torch/encoder/star_transformer.py
imports: import numpy
  import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 1 to create a new _MSA1 object from inherited base classes: nn with example: obj = _MSA1(nhid, nhead, head_dim, dropout)