class_docstr: Base Class for implementing AdaptiveModel with frameworks like PyTorch and ONNX.
class_docstr_tok: ["Base","Class","for","implementing","AdaptiveModel","with","frameworks","like","PyTorch","and","ONNX","."]
docstr: Get predictions from all prediction heads.
  
  :param logits: logits, can vary in shape and type, depending on task
  :type logits: object
  :param label_maps: Maps from label encoding to label string
  :param label_maps: dict
  :return: A list of all predictions from all prediction heads
docstr_tok: ["Get","predictions","from","all","prediction","heads",".",":","param","logits",":","logits",",","can","vary","in","shape","and","type",",","depending","on","task",":","type","logits",":","object",":","param","label_maps",":","Maps","from","label","encoding","to","label","string",":","param","label_maps",":","dict",":","return",":","A","list","of","all","predictions","from","all","prediction","heads"]
code: def logits_to_preds(self, logits, **kwargs):
      """
      Get predictions from all prediction heads.
  
      :param logits: logits, can vary in shape and type, depending on task
      :type logits: object
      :param label_maps: Maps from label encoding to label string
      :param label_maps: dict
      :return: A list of all predictions from all prediction heads
      """
      all_preds = []
      # collect preds from all heads
      for head, logits_for_head in zip(self.prediction_heads, logits):
          preds = head.logits_to_preds(logits=logits_for_head, **kwargs)
          all_preds.append(preds)
      return all_preds
  
imports: import copy
  import json
  import logging
  import os
  from argparse import Namespace
  from pathlib import Path
  import multiprocessing
  import numpy
  import torch
  from torch import nn
  from farm.data_handler.processor import TextSimilarityProcessor
  from farm.data_handler.data_silo import DataSilo
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.prediction_head import PredictionHead, TextSimilarityHead
  from farm.modeling.tokenization import Tokenizer
  from farm.utils import MLFlowLogger, stack
label_desc: Use image node_id 4 for calling the BaseBiAdaptiveModel obj's underlying member method code with example usage: obj.logits_to_preds(logits) and returns: all_preds