class_docstr: Modified from transformers.models.bert.modeling_bert.BertOutput.
  
  Compared to the BertOutput of Huggingface, only add the clamp.
class_docstr_tok: ["Modified","from","transformers.models.bert.modeling_bert.BertOutput",".","Compared","to","the","BertOutput","of","Huggingface",",","only","add","the","clamp","."]
code: def forward(
      self, hidden_states: Tensor, input_tensor: Tensor
  ) -> Tensor:
      hidden_states = self.dense(hidden_states)
      hidden_states = self.dropout(hidden_states)
      hidden_states = clamp_values(hidden_states)
      hidden_states = self.LayerNorm(hidden_states + input_tensor)
      hidden_states = clamp_values(hidden_states)
      return hidden_states
  
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 for calling the BertOutput obj's underlying member method code with example usage: obj.forward(hidden_states, input_tensor) and returns: hidden_states