class_docstr: Complete Bert layer.
class_docstr_tok: ["Complete","Bert","layer","."]
code: def forward(self, hidden_states, attention_mask, head_mask=None):
      attention_outputs = self.attention(
          hidden_states, attention_mask, head_mask
      )
      attention_output = attention_outputs[0]
      intermediate_output = self.intermediate(attention_output)
      layer_output = self.output(intermediate_output, attention_output)
      outputs = (layer_output,) + attention_outputs[
          1:
      ]  # add attentions if we output them
      return outputs
  
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 2 for calling the BertLayer obj's underlying member method code with example usage: obj.forward(hidden_states, attention_mask, head_mask) and returns: outputs