class_docstr: Output layer for pair (two-tower) regression models. Accepts two embedding tensors,
  and computes cosine similarity. The loss is between regression label and cosine
  similarity.
docstr: Args:
      logits (Tuple[torch.Tensor, torch.Tensor]): Logits returned from pairwise
          model
  
  Returns:
      Tuple[torch.Tensor, torch.Tensor]: Model prediction and scores.
docstr_tok: ["Args",":","logits","(","Tuple","[","torch.Tensor",",","torch.Tensor","]",")",":","Logits","returned","from","pairwise","model","Returns",":","Tuple","[","torch.Tensor",",","torch.Tensor","]",":","Model","prediction","and","scores","."]
code: def get_pred(self, logits, *args, **kwargs):
      """
      Args:
          logits (Tuple[torch.Tensor, torch.Tensor]): Logits returned from pairwise
              model
  
      Returns:
          Tuple[torch.Tensor, torch.Tensor]: Model prediction and scores.
      """
      assert isinstance(logits, tuple)
      prediction = torch.cosine_similarity(logits[0], logits[1], dim=1)
      return prediction, prediction
  
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from pytext.config.component import create_loss
  from pytext.loss import MAELoss, MSELoss
  from pytext.utils.usage import log_class_usage
  from .output_layer_base import OutputLayerBase
label_desc: Use image node_id 4 for calling the PairwiseCosineRegressionOutputLayer obj's underlying member method code with example usage: obj.get_pred(logits) and returns: prediction,  prediction