class_docstr: A classification model that scores a pair of texts, for example, a model for
  natural language inference.
  
  The model shares embedding space (so it doesn't support
  pairs of texts where left and right are in different languages). It uses
  bidirectional LSTM or CNN to represent the two documents, and concatenates
  them along with their absolute difference and elementwise product. This
  concatenated pair representation is passed to a multi-layer perceptron to
  decode to label/target space.
  
  See https://arxiv.org/pdf/1705.02364.pdf for more details.
  
  It can be instantiated just like any other :class:`~Model`.
class_docstr_tok: ["A","classification","model","that","scores","a","pair","of","texts",",","for","example",",","a","model","for","natural","language","inference",".","The","model","shares","embedding","space","(","so","it","does","n't","support","pairs","of","texts","where","left","and","right","are","in","different","languages",")",".","It","uses","bidirectional","LSTM","or","CNN","to","represent","the","two","documents",",","and","concatenates","them","along","with","their","absolute","difference","and","elementwise","product",".","This","concatenated","pair","representation","is","passed","to","a","multi-layer","perceptron","to","decode","to","label\/target","space",".","See","https",":","\/\/arxiv.org\/pdf\/1705.02364.pdf","for","more","details",".","It","can","be","instantiated","just","like","any","other",":","class",":","`","~Model","`","."]
code: def _represent(
      self, embeddings: List[torch.Tensor], seq_lens: List[torch.Tensor]
  ):
      representations = self._represent_sort(
          embeddings, seq_lens, self.representations
      )
      if self.encode_relations:
          representations = self._encode_relations(representations)
      return torch.cat(representations, -1)
  
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 10 for calling the PairwiseModel obj's underlying member method code with example usage: obj._represent(embeddings, seq_lens) and returns: torch