docstr:     Gets mention scores using raw context encodings
  
  Inputs:
      raw_ctxt_encoding: torch.FloatTensor (bsz, seqlen, embed_dim)
  Returns:
      torch.FloatTensor (bsz, num_total_mentions): mention scores/logits
      torch.IntTensor (bsz, num_total_mentions): mention boundaries
docstr_tok: ["Gets","mention","scores","using","raw","context","encodings","Inputs",":","raw_ctxt_encoding",":","torch.FloatTensor","(","bsz",",","seqlen",",","embed_dim",")","Returns",":","torch.FloatTensor","(","bsz",",","num_total_mentions",")",":","mention","scores\/logits","torch.IntTensor","(","bsz",",","num_total_mentions",")",":","mention","boundaries"]
code: def get_ctxt_mention_scores(
      self,
      token_idx_ctxt,
      segment_idx_ctxt,
      mask_ctxt,
      raw_ctxt_encoding=None,
  ):
      """
          Gets mention scores using raw context encodings
  
      Inputs:
          raw_ctxt_encoding: torch.FloatTensor (bsz, seqlen, embed_dim)
      Returns:
          torch.FloatTensor (bsz, num_total_mentions): mention scores/logits
          torch.IntTensor (bsz, num_total_mentions): mention boundaries
      """
      # (bsz, seqlen, embed_dim)
      if raw_ctxt_encoding is None:
          raw_ctxt_encoding = self.get_raw_ctxt_encoding(
              token_idx_ctxt,
              segment_idx_ctxt,
              mask_ctxt,
          )
  
      # (num_total_mentions,); (num_total_mentions,)
      return self.classification_heads["mention_scores"](
          raw_ctxt_encoding,
          mask_ctxt,
      )
  
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 3 for calling the BiEncoderModule obj's underlying member method code with example usage: obj.get_ctxt_mention_scores(token_idx_ctxt, segment_idx_ctxt, mask_ctxt, raw_ctxt_encoding) and returns: self