class_docstr: Poly-encoder Agent.
  
  Equivalent of bert_ranker/polyencoder and biencoder_multiple_output but does not
  rely on an external library (hugging face).
class_docstr_tok: ["Poly-encoder","Agent",".","Equivalent","of","bert_ranker\/polyencoder","and","biencoder_multiple_output","but","does","not","rely","on","an","external","library","(","hugging","face",")","."]
docstr: Make candidate encs.
  
  The polyencoder module expects cand vecs to be 3D while torch_ranker_agent
  expects it to be 2D. This requires a little adjustment (used in interactive mode
  only)
docstr_tok: ["Make","candidate","encs",".","The","polyencoder","module","expects","cand","vecs","to","be","3D","while","torch_ranker_agent","expects","it","to","be","2D",".","This","requires","a","little","adjustment","(","used","in","interactive","mode","only",")"]
code: def _make_candidate_encs(self, vecs):
      """
      Make candidate encs.
  
      The polyencoder module expects cand vecs to be 3D while torch_ranker_agent
      expects it to be 2D. This requires a little adjustment (used in interactive mode
      only)
      """
      rep = super()._make_candidate_encs(vecs)
      return rep.transpose(0, 1).contiguous()
  
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 8 for calling the PolyencoderAgent obj's underlying member method code with example usage: obj._make_candidate_encs(vecs) and returns: rep