class_docstr: Basic class of models
  
  Attributes:
      hparams (HParams): A HParams object, holds the entire set of hyperparameters.
      train_iterator (object): An iterator to load the data in training steps.
      test_iterator (object): An iterator to load the data in testing steps.
      graph (object): An optional graph.
      seed (int): Random seed.
class_docstr_tok: ["Basic","class","of","models","Attributes",":","hparams","(","HParams",")",":","A","HParams","object",",","holds","the","entire","set","of","hyperparameters",".","train_iterator","(","object",")",":","An","iterator","to","load","the","data","in","training","steps",".","test_iterator","(","object",")",":","An","iterator","to","load","the","data","in","testing","steps",".","graph","(","object",")",":","An","optional","graph",".","seed","(","int",")",":","Random","seed","."]
docstr: Make final output as prediction score, according to different tasks.
  
  Args:
      logit (object): Base prediction value.
      task (str): A task (values: regression/classification)
  
  Returns:
      object: Transformed score
docstr_tok: ["Make","final","output","as","prediction","score",",","according","to","different","tasks",".","Args",":","logit","(","object",")",":","Base","prediction","value",".","task","(","str",")",":","A","task","(","values",":","regression\/classification",")","Returns",":","object",":","Transformed","score"]
code: def _get_pred(self, logit, task):
      """Make final output as prediction score, according to different tasks.
  
      Args:
          logit (object): Base prediction value.
          task (str): A task (values: regression/classification)
  
      Returns:
          object: Transformed score
      """
      if task == "regression":
          pred = tf.identity(logit)
      elif task == "classification":
          pred = tf.sigmoid(logit)
      else:
          raise ValueError(
              "method must be regression or classification, but now is {0}".format(
                  task
              )
          )
      return pred
  
imports: import abc
  import time
  import numpy
  from tqdm import tqdm
  import tensorflow
  from tensorflow.compat.v1 import keras
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 7 for calling the BaseModel obj's underlying member method code with example usage: obj._get_pred(logit, task) and returns: pred