class_docstr: Poly-encoder model with image features.
  
  Model that allows encoding image features and adding or concatenating them to the
  context encoding.
class_docstr_tok: ["Poly-encoder","model","with","image","features",".","Model","that","allows","encoding","image","features","and","adding","or","concatenating","them","to","the","context","encoding","."]
docstr: Override PolyEncoderModule's inputs into the context encoder.
docstr_tok: ["Override","PolyEncoderModule","'s","inputs","into","the","context","encoder","."]
code: def _context_encoder_input(
      self, ctxt_inputs: Dict[str, Any]
  ) -> Dict[str, Any]:
      """
      Override PolyEncoderModule's inputs into the context encoder.
      """
      assert set(ctxt_inputs.keys()) == {"ctxt_tokens", "ctxt_image"}
      return {
          "src_tokens": ctxt_inputs["ctxt_tokens"],
          "image_features": ctxt_inputs["ctxt_image"],
      }
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from typing import Any, Dict
  import torch
  from parlai.agents.image_seq2seq.modules import ContextWithImageEncoder
  from parlai.agents.transformer.polyencoder import PolyencoderAgent, PolyEncoderModule
  from parlai.core.torch_agent import Batch
  from parlai.core.torch_image_agent import TorchImageAgent
  from parlai.utils.misc import warn_once
label_desc: Use image node_id 2 for calling the ImagePolyencoderModule obj's underlying member method code with example usage: obj._context_encoder_input(ctxt_inputs) and returns: dict