class_docstr: A simple wrapper around the transformer encoder which adds a linear layer.
class_docstr_tok: ["A","simple","wrapper","around","the","transformer","encoder","which","adds","a","linear","layer","."]
docstr: Scores each concatenation text + candidate.
docstr_tok: ["Scores","each","concatenation","text","+","candidate","."]
code: def forward(self, tokens, segments):
      """
      Scores each concatenation text + candidate.
      """
      encoded = self.encoder(tokens, None, segments)
      res = self.linear_layer(encoded)
      return res
  
file_path: ParlAI/parlai/agents/transformer/crossencoder.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from .modules import TransformerEncoder
  from parlai.core.torch_ranker_agent import TorchRankerAgent
  from .transformer import TransformerRankerAgent
  from parlai.utils.torch import concat_without_padding
  import torch
label_desc: Use image node_id 2 for calling the CrossEncoderModule obj's underlying member method code with example usage: obj.forward(tokens, segments) and returns: res