class_docstr: Combines encoder_embedding with the encoder component
class_docstr_tok: ["Combines","encoder_embedding","with","the","encoder","component"]
code: def forward(self, input_ids, encoder_mask):
      if self.rpe is None:
          position_ids = build_position_ids(input_ids)
      else:
          position_ids = None
  
      enc_input = self.encoder_embedding(
          input_ids, position_ids, token_type_ids=None
      )
  
      # pass input through the encoder
      enc_seq_length = input_ids.size(1)
  
      rpe = None
      if self.rpe is not None:
          rpe = self.rpe(
              query_seq_length=enc_seq_length,
              key_seq_length=enc_seq_length,
          )
  
      return (
          self.encoder(
              enc_input=enc_input,
              enc_attn_mask=encoder_mask,
              enc_self_attention_relative_position_bias=rpe,
          )
          .permute(1, 0, 2)
          .float()
      )
  
imports: import random
  from typing import Dict, List, Optional
  import torch
  import torch.nn.functional
  from nemo.collections.nlp.modules.common.megatron.utils import build_position_ids
  from nemo.core.classes.exportable import Exportable
  from nemo.core.neural_types import ChannelType, EncodedRepresentation, MaskType, NeuralType
label_desc: Use image node_id 4 for calling the EncEmb obj's underlying member method code with example usage: obj.forward(input_ids, encoder_mask) and returns: self