class_docstr: Text Pair Regression Model for tasks such as Semantic Textual Similarity Benchmark.
  
  The model takes document embeddings and puts resulting text representation(s) into a linear layer to get the
  score. We provide two ways to embed the DataPairs: Either by embedding both DataPoints
  and concatenating the resulting vectors ("embed_separately=True") or by concatenating the DataPoints and embedding
  the resulting vector ("embed_separately=False").
class_docstr_tok: ["Text","Pair","Regression","Model","for","tasks","such","as","Semantic","Textual","Similarity","Benchmark",".","The","model","takes","document","embeddings","and","puts","resulting","text","representation","(","s",")","into","a","linear","layer","to","get","the","score",".","We","provide","two","ways","to","embed","the","DataPairs",":","Either","by","embedding","both","DataPoints","and","concatenating","the","resulting","vectors","(","``","embed_separately=True","''",")","or","by","concatenating","the","DataPoints","and","embedding","the","resulting","vector","(","``","embed_separately=False","''",")","."]
code: def _get_embedding_for_data_point(
      self, prediction_data_point: TextPair
  ) -> torch.Tensor:
      embedding_names = self.embeddings.get_names()
      if self.embed_separately:
          self.embeddings.embed(
              [
                  prediction_data_point.first,
                  prediction_data_point.second,
              ]
          )
          return torch.cat(
              [
                  prediction_data_point.first.get_embedding(
                      embedding_names
                  ),
                  prediction_data_point.second.get_embedding(
                      embedding_names
                  ),
              ],
              0,
          )
      else:
          concatenated_sentence = Sentence(
              prediction_data_point.first.to_tokenized_string()
              + self.sep
              + prediction_data_point.second.to_tokenized_string(),
              use_tokenizer=False,
          )
          self.embeddings.embed(concatenated_sentence)
          return concatenated_sentence.get_embedding(embedding_names)
  
imports: import typing
  from pathlib import Path
  from typing import Any, List, Optional, Tuple, Union
  import torch
  from torch import nn
  from torch.utils.data.dataset import Dataset
  from tqdm import tqdm
  import flair.embeddings
  import flair.nn
  from flair.data import Corpus, Dictionary, Sentence, TextPair, _iter_dataset
  from flair.datasets import DataLoader, FlairDatapointDataset
  from flair.nn.model import ReduceTransformerVocabMixin
  from flair.training_utils import MetricRegression, Result, store_embeddings
label_desc: Use image node_id 10 for calling the TextPairRegressor obj's underlying member method code with example usage: obj._get_embedding_for_data_point(prediction_data_point) and returns: torch, concatenated_sentence