class_docstr: Poly-encoder model.
  
  See https://arxiv.org/abs/1905.01969 for more details
class_docstr_tok: ["Poly-encoder","model",".","See","https",":","\/\/arxiv.org\/abs\/1905.01969","for","more","details"]
docstr: Return the inputs to the context encoder as a dictionary.
  
  Must return a dictionary.  This will be passed directly into the model via
  `**kwargs`, i.e.,
  
  >>> encoder_ctxt(**_context_encoder_input(ctxt_inputs))
  
  This is needed because the context encoder's forward function may have different
  argument names than that of the model itself. This is intentionally overridable
  so that richer models can pass additional inputs.
docstr_tok: ["Return","the","inputs","to","the","context","encoder","as","a","dictionary",".","Must","return","a","dictionary",".","This","will","be","passed","directly","into","the","model","via","`","*","*","kwargs","`",",","i.e.",",",">",">",">","encoder_ctxt","(","*","*","_context_encoder_input","(","ctxt_inputs",")",")","This","is","needed","because","the","context","encoder","'s","forward","function","may","have","different","argument","names","than","that","of","the","model","itself",".","This","is","intentionally","overridable","so","that","richer","models","can","pass","additional","inputs","."]
code: def _context_encoder_input(
      self, ctxt_inputs: Dict[str, Any]
  ) -> Dict[str, Any]:
      """
      Return the inputs to the context encoder as a dictionary.
  
      Must return a dictionary.  This will be passed directly into the model via
      `**kwargs`, i.e.,
  
      >>> encoder_ctxt(**_context_encoder_input(ctxt_inputs))
  
      This is needed because the context encoder's forward function may have different
      argument names than that of the model itself. This is intentionally overridable
      so that richer models can pass additional inputs.
      """
      assert set(ctxt_inputs.keys()) == {"ctxt_tokens"}
      return {"input": ctxt_inputs["ctxt_tokens"]}
  
imports: from parlai.core.params import ParlaiParser
  from typing import Any, Dict, Optional, Tuple
  import torch
  from parlai.core.opt import Opt
  from parlai.core.torch_ranker_agent import TorchRankerAgent
  from parlai.core.torch_agent import Batch
  from parlai.utils.misc import recursive_getattr
  from parlai.utils.logging import logging
  from .biencoder import AddLabelFixedCandsTRA
  from .modules import BasicAttention, MultiHeadAttention, TransformerEncoder
  from .transformer import TransformerRankerAgent
label_desc: Use image node_id 7 for calling the PolyEncoderModule obj's underlying member method code with example usage: obj._context_encoder_input(ctxt_inputs) and returns: dict