docstr:     Gets raw, shared context embeddings from BERT,
      to be used by both mention detector and entity linker
  
  Returns:
      torch.FloatTensor (bsz, seqlen, embed_dim)
docstr_tok: ["Gets","raw",",","shared","context","embeddings","from","BERT",",","to","be","used","by","both","mention","detector","and","entity","linker","Returns",":","torch.FloatTensor","(","bsz",",","seqlen",",","embed_dim",")"]
code: def get_raw_ctxt_encoding(
      self,
      token_idx_ctxt,
      segment_idx_ctxt,
      mask_ctxt,
  ):
      """
          Gets raw, shared context embeddings from BERT,
          to be used by both mention detector and entity linker
  
      Returns:
          torch.FloatTensor (bsz, seqlen, embed_dim)
      """
      raw_ctxt_encoding, _, _ = self.context_encoder.bert_model(
          token_idx_ctxt,
          segment_idx_ctxt,
          mask_ctxt,
      )
      return raw_ctxt_encoding
  
imports: import os
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from tqdm import tqdm
  from collections import OrderedDict
  from pytorch_transformers.modeling_bert import BertPreTrainedModel, BertConfig, BertModel
  from pytorch_transformers.tokenization_bert import BertTokenizer
  from elq.common.ranker_base import BertEncoder, get_model_obj
  from blink.common.optimizer import get_bert_optimizer
  from elq.biencoder.allennlp_span_utils import batched_span_select, batched_index_select
  from elq.biencoder.utils import batch_reshape_mask_left
label_desc: Use image node_id 2 for calling the BiEncoderModule obj's underlying member method code with example usage: obj.get_raw_ctxt_encoding(token_idx_ctxt, segment_idx_ctxt, mask_ctxt) and returns: raw_ctxt_encoding