text: 
  
  TITLE
  Why do not use 'torch.nn.MultiheadAttention' to substitude 'Class BertSelfAttention+BertSelfOutput' for pytorch
  
  COMMENTS
  2
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  # 📚 Migration
  
  ## Information
  pytorch has 'torch.nn.MultiheadAttention' 
  https://pytorch.org/docs/1.3.0/nn.html?highlight=multihead#torch.nn.MultiheadAttention
  
  ## Details
  1. For Better performace and generality, I suggest to use  'torch.nn.MultiheadAttention'  instead of 'Class BertSelfAttention+BertSelfOutput'  in BERT model
  
  
  
  