class_docstr: Output layer for multilabel sequence classification models.
  
  Args:
      outputs (Dict[str, ClassificationOutputLayer]): Output for multilabels
      optional label_weights (Dict[str, int]): Dict of label_names along with the
      weight for label
docstr: Compute and return prediction and scores from the model.
  
  Prediction is computed using argmax over the document label/target space.
  
  Scores are sigmoid or softmax scores over the model logits depending on
  the loss component being used.
  
  Args:
      logits (List[torch.Tensor]): Logits returned by
          :class:`~pytext.models.decoders.MultiLabelDecoder`. It's list
          containing logits for all label tasks here pTSR, autoUSM and EA.
      targets (List[torch.Tensor]): Targets as computed by the true labels
      ordering of logits corresponding the respective label.
      context (Optional[torch.Tensor]): Not applicable. Defaults to None.
  Returns:
      Tuple[torch.Tensor, torch.Tensor]: Model prediction and scores.
docstr_tok: ["Compute","and","return","prediction","and","scores","from","the","model",".","Prediction","is","computed","using","argmax","over","the","document","label\/target","space",".","Scores","are","sigmoid","or","softmax","scores","over","the","model","logits","depending","on","the","loss","component","being","used",".","Args",":","logits","(","List","[","torch.Tensor","]",")",":","Logits","returned","by",":","class",":","`","~pytext.models.decoders.MultiLabelDecoder","`",".","It","'s","list","containing","logits","for","all","label","tasks","here","pTSR",",","autoUSM","and","EA",".","targets","(","List","[","torch.Tensor","]",")",":","Targets","as","computed","by","the","true","labels","ordering","of","logits","corresponding","the","respective","label",".","context","(","Optional","[","torch.Tensor","]",")",":","Not","applicable",".","Defaults","to","None",".","Returns",":","Tuple","[","torch.Tensor",",","torch.Tensor","]",":","Model","prediction","and","scores","."]
code: def get_pred(
      self,
      logits: List[torch.Tensor],
      targets: List[torch.Tensor],
      context: Optional[Dict[str, Any]] = None,
      *args,
      **kwargs,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """Compute and return prediction and scores from the model.
  
      Prediction is computed using argmax over the document label/target space.
  
      Scores are sigmoid or softmax scores over the model logits depending on
      the loss component being used.
  
      Args:
          logits (List[torch.Tensor]): Logits returned by
              :class:`~pytext.models.decoders.MultiLabelDecoder`. It's list
              containing logits for all label tasks here pTSR, autoUSM and EA.
          targets (List[torch.Tensor]): Targets as computed by the true labels
          ordering of logits corresponding the respective label.
          context (Optional[torch.Tensor]): Not applicable. Defaults to None.
      Returns:
          Tuple[torch.Tensor, torch.Tensor]: Model prediction and scores.
  
      """
      # The assumption here is that the logit is a concat of the
      # label predictions ordered by label list.
      scores = []
      preds = []
      for output_layer, logit in zip(self.outputs.values(), logits):
          pred, score = output_layer.get_pred(logit)
          preds.append(pred)
          scores.append(score)
      return (tuple(preds), tuple(scores))
  
imports: import functools
  import operator
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  import torch.nn
  from caffe2.python import core
  from pytext.data.tensorizers import Tensorizer
  from pytext.utils.usage import log_class_usage
  from torch import jit
  from .doc_classification_output_layer import ClassificationOutputLayer
  from .output_layer_base import OutputLayerBase
label_desc: Use image node_id 4 for calling the MultiLabelClassificationLayer obj's underlying member method code with example usage: obj.get_pred(logits, targets, context) and returns: tuple,  tuple