class_docstr: BertAttention is made up of self-attention and intermediate+output.
  
  Compared to the BertAttention of Huggingface, only add the clamp.
  
  Args:
      config (:class:`~transformers.BertConfig`):
          The configuration object that
          contains various parameters for the model.
      clamp_min_for_underflow (bool, optional):
          Whether to clamp the minimum value of the hidden states
           to prevent underflow. Defaults to `False`.
      clamp_max_for_overflow (bool, optional):
          Whether to clamp the maximum value of the hidden states
          to prevent overflow. Defaults to `False`.
class_docstr_tok: ["BertAttention","is","made","up","of","self-attention","and","intermediate+output",".","Compared","to","the","BertAttention","of","Huggingface",",","only","add","the","clamp",".","Args",":","config","(",":","class",":","`","~transformers.BertConfig","`",")",":","The","configuration","object","that","contains","various","parameters","for","the","model",".","clamp_min_for_underflow","(","bool",",","optional",")",":","Whether","to","clamp","the","minimum","value","of","the","hidden","states","to","prevent","underflow",".","Defaults","to","`","False","`",".","clamp_max_for_overflow","(","bool",",","optional",")",":","Whether","to","clamp","the","maximum","value","of","the","hidden","states","to","prevent","overflow",".","Defaults","to","`","False","`","."]
code: def __init__(
      self,
      config: BertConfig,
      clamp_min_for_underflow: bool = False,
      clamp_max_for_overflow: bool = False,
  ):
      super().__init__(config)
      self.self = BertSelfAttention(
          config, clamp_min_for_underflow, clamp_max_for_overflow
      )
  
imports: import math
  from typing import Dict, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from mmcv.cnn.bricks import DropPath
  from torch import Tensor
label_desc: Use image node_id 1 to create a new BertAttention object from inherited base classes: HFBertAttention with example: obj = BertAttention(config, clamp_min_for_underflow, clamp_max_for_overflow)