class_docstr: Pairwise classification model following the pattern of two tensorizers + two
  (usually shared) encoders. Also supports exporting a single tensorizer + encoder
  to produce a sentence embedding.
class_docstr_tok: ["Pairwise","classification","model","following","the","pattern","of","two","tensorizers","+","two","(","usually","shared",")","encoders",".","Also","supports","exporting","a","single","tensorizer","+","encoder","to","produce","a","sentence","embedding","."]
code: def forward(
      self,
      input_tuple1: Tuple[torch.Tensor, ...],
      input_tuple2: Tuple[torch.Tensor, ...],
  ) -> torch.Tensor:
      encodings = self._encoder_forwards(input_tuple1, input_tuple2)
      if self.encode_relations:
          encodings = self._encode_relations(encodings)
      return (
          self.decoder(torch.cat(encodings, -1))
          if self.decoder
          else encodings
      )
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn
  from pytext.common.constants import Stage
  from pytext.config.component import create_loss
  from pytext.data.bert_tensorizer import BERTTensorizer, BERTTensorizerBase
  from pytext.data.dense_retrieval_tensorizer import BERTContextTensorizerForDenseRetrieval, PositiveLabelTensorizerForDenseRetrieval
  from pytext.data.tensorizers import FloatListTensorizer, LabelTensorizer, NtokensTensorizer, Tensorizer
  from pytext.loss import BinaryCrossEntropyLoss, MultiLabelSoftMarginLoss
  from pytext.models.decoders.mlp_decoder import MLPDecoder
  from pytext.models.model import BaseModel, ModelInputBase
  from pytext.models.module import create_module
  from pytext.models.output_layers import ClassificationOutputLayer
  from pytext.models.output_layers.doc_classification_output_layer import BinaryClassificationOutputLayer, MulticlassOutputLayer, MultiLabelOutputLayer
  from pytext.models.pair_classification_model import BasePairwiseModel
  from pytext.models.representations.huggingface_bert_sentence_encoder import HuggingFaceBertSentenceEncoder
  from pytext.models.representations.huggingface_electra_sentence_encoder import HuggingFaceElectraSentenceEncoder
  from pytext.models.representations.representation_base import RepresentationBase
  from pytext.models.representations.transformer_sentence_encoder_base import TransformerSentenceEncoderBase
  from pytext.torchscript.module import ScriptPyTextEmbeddingModuleIndex, ScriptPyTextEmbeddingModuleWithDenseIndex
  from pytext.torchscript.utils import ScriptBatchInput, squeeze_1d, squeeze_2d
  from pytext.utils.label import get_label_weights
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 7 for calling the _EncoderPairwiseModel obj's underlying member method code with example usage: obj.forward(input_tuple1, input_tuple2) and returns: unknown