class_docstr: Construct the embeddings from word, position and token_type embeddings.
class_docstr_tok: ["Construct","the","embeddings","from","word",",","position","and","token_type","embeddings","."]
code: def forward(
      self,
      input_ids,
      token_type_ids=None,
      position_ids=None,
      features=None,
  ):
      if token_type_ids is None:
          token_type_ids = torch.zeros_like(input_ids)
  
      token_type_embeddings = self.token_type_embeddings(token_type_ids)
  
      if position_ids is not None:
          position_embeddings = self.position_embeddings(position_ids)
          embeddings = (
              position_embeddings + token_type_embeddings + features
          )
      else:
          embeddings = token_type_embeddings + features
  
      embeddings = self.layer_norm(embeddings)
      embeddings = self.dropout(embeddings)
      return embeddings
  
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 BertEmbeddings obj's underlying member method code with example usage: obj.forward(input_ids, token_type_ids, position_ids, features) and returns: embeddings