class_docstr: **Transformer** 当中的 **DotAttention**
  
  :param key_size:
  :param value_size:
  :param dropout:
class_docstr_tok: ["*","*","Transformer","*","*","\u5f53\u4e2d\u7684","*","*","DotAttention","*","*",":","param","key_size",":",":","param","value_size",":",":","param","dropout",":"]
code: def __init__(self, key_size, value_size, dropout=0.0):
      super(DotAttention, self).__init__()
      self.key_size = key_size
      self.value_size = value_size
      self.scale = math.sqrt(key_size)
      self.drop = nn.Dropout(dropout)
      self.softmax = nn.Softmax(dim=-1)
  
imports: import math
  import torch
  import torch.nn.functional
  from torch import nn
  from .decoder.seq2seq_state import TransformerState
label_desc: Use image node_id 1 to create a new DotAttention object from inherited base classes: nn with example: obj = DotAttention(key_size, value_size, dropout)