docstr: Args:
      token: (B, L), index of tokens
      pos1: (B, L), relative position to head entity
      pos2: (B, L), relative position to tail entity
  Return:
      (B, H), representations for sentences
docstr_tok: ["Args",":","token",":","(","B",",","L",")",",","index","of","tokens","pos1",":","(","B",",","L",")",",","relative","position","to","head","entity","pos2",":","(","B",",","L",")",",","relative","position","to","tail","entity","Return",":","(","B",",","H",")",",","representations","for","sentences"]
code: def forward(self, token, pos1, pos2):
      """
      Args:
          token: (B, L), index of tokens
          pos1: (B, L), relative position to head entity
          pos2: (B, L), relative position to tail entity
      Return:
          (B, H), representations for sentences
      """
      # Check size of tensors
      pass
  
file_path: OpenNRE/opennre/encoder/base_encoder.py
imports: import math, logging
  import torch
  import torch.nn
  import torch.nn.functional
  import numpy
  from ..tokenization import WordTokenizer
label_desc: Use image node_id 2 for calling the BaseEncoder obj's underlying member method code with example usage: obj.forward(token, pos1, pos2) without return types