class_docstr: Base class for models
class_docstr_tok: ["Base","class","for","models"]
code: def _activate(self, logit, activation):
      if activation == "sigmoid":
          return tf.nn.sigmoid(logit)
      elif activation == "softmax":
          return tf.nn.softmax(logit)
      elif activation == "relu":
          return tf.nn.relu(logit)
      elif activation == "tanh":
          return tf.nn.tanh(logit)
      elif activation == "elu":
          return tf.nn.elu(logit)
      elif activation == "identity":
          return tf.identity(logit)
      else:
          raise ValueError(
              "this activations not defined {0}".format(activation)
          )
  
imports: from os.path import join
  import abc
  import time
  import os
  import numpy
  import tensorflow
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 15 for calling the BaseModel obj's underlying member method code with example usage: obj._activate(logit, activation) and returns: tf, tf, tf, tf, tf, tf