class_docstr: Multi-head scaled dot-product attention layer.
  
  Args:
      hidden_size: size of the embeddings in the model, also known as d_model
      num_attention_heads: number of heads in multi-head attention
      attn_score_dropout: probability of dropout applied to attention scores
      attn_layer_dropout: probability of dropout applied to the output of the
          whole layer, but before layer normalization
class_docstr_tok: ["Multi-head","scaled","dot-product","attention","layer",".","Args",":","hidden_size",":","size","of","the","embeddings","in","the","model",",","also","known","as","d_model","num_attention_heads",":","number","of","heads","in","multi-head","attention","attn_score_dropout",":","probability","of","dropout","applied","to","attention","scores","attn_layer_dropout",":","probability","of","dropout","applied","to","the","output","of","the","whole","layer",",","but","before","layer","normalization"]
code: def transpose_for_scores(self, x):
      new_x_shape = x.size()[:-1] + (
          self.num_attention_heads,
          self.attn_head_size,
      )
      x = x.view(*new_x_shape)
      return x.permute(0, 2, 1, 3)
  
imports: import math
  import numpy
  import torch
  from torch import nn
  from torch.nn.functional import gelu
  from nemo.collections.common.parts import form_attention_mask
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the MultiHeadAttention obj's underlying member method code with example usage: obj.transpose_for_scores(x) and returns: x