class_docstr: A base classification model that scores a pair of texts.
  
  Subclasses need to implement the from_config, forward and save_modules.
class_docstr_tok: ["A","base","classification","model","that","scores","a","pair","of","texts",".","Subclasses","need","to","implement","the","from_config",",","forward","and","save_modules","."]
code: def from_config(
      cls, config: Config, tensorizers: Dict[str, Tensorizer]
  ):
      raise NotImplementedError
  
imports: import itertools
  import os
  from typing import Dict, List, Tuple, Union
  import torch
  import torch.nn
  from pytext.data.tensorizers import LabelTensorizer, Tensorizer, TokenTensorizer
  from pytext.models.decoders import DecoderBase
  from pytext.models.decoders.mlp_decoder import MLPDecoder
  from pytext.models.embeddings import EmbeddingBase, EmbeddingList, WordEmbedding
  from pytext.models.model import BaseModel
  from pytext.models.module import create_module
  from pytext.models.output_layers import ClassificationOutputLayer, OutputLayerBase, PairwiseCosineDistanceOutputLayer
  from pytext.models.representations.bilstm_doc_attention import BiLSTMDocAttention
  from pytext.models.representations.docnn import DocNNRepresentation
  from pytext.models.representations.representation_base import RepresentationBase
  from pytext.utils.file_io import PathManager
  from scipy.special import comb
label_desc: Use image node_id 2 for calling the BasePairwiseModel obj's underlying member method code with example usage: obj.from_config(cls, config, tensorizers) without return types