class_docstr: Self-attention layer.
class_docstr_tok: ["Self-attention","layer","."]
code: def __init__(self, config):
      super().__init__()
      self.self = BertSelfAttention(config)
      self.output = BertSelfOutput(config)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import math
  import torch
  from torch import nn
  from towhee.models.layers.activations import swish, gelu
label_desc: Use image node_id 1 to create a new BertAttention object from inherited base classes: nn with example: obj = BertAttention(config)