class_docstr: Base class for models
class_docstr_tok: ["Base","class","for","models"]
code: def _get_initializer(self):
      if self.hparams.init_method == "tnormal":
          return tf.compat.v1.truncated_normal_initializer(
              stddev=self.hparams.init_value, seed=self.seed
          )
      elif self.hparams.init_method == "uniform":
          return tf.compat.v1.random_uniform_initializer(
              -self.hparams.init_value,
              self.hparams.init_value,
              seed=self.seed,
          )
      elif self.hparams.init_method == "normal":
          return tf.compat.v1.random_normal_initializer(
              stddev=self.hparams.init_value, seed=self.seed
          )
      elif self.hparams.init_method == "xavier_normal":
          return tf.compat.v1.keras.initializers.VarianceScaling(
              scale=1.0,
              mode="fan_avg",
              distribution=("uniform" if False else "truncated_normal"),
              seed=self.seed,
          )
      elif self.hparams.init_method == "xavier_uniform":
          return tf.compat.v1.keras.initializers.VarianceScaling(
              scale=1.0,
              mode="fan_avg",
              distribution=("uniform" if True else "truncated_normal"),
              seed=self.seed,
          )
      elif self.hparams.init_method == "he_normal":
          return tf.compat.v1.keras.initializers.VarianceScaling(
              scale=2.0,
              mode=("FAN_IN").lower(),
              distribution=("uniform" if False else "truncated_normal"),
              seed=self.seed,
          )
      elif self.hparams.init_method == "he_uniform":
          return tf.compat.v1.keras.initializers.VarianceScaling(
              scale=2.0,
              mode=("FAN_IN").lower(),
              distribution=("uniform" if True else "truncated_normal"),
              seed=self.seed,
          )
      else:
          return tf.compat.v1.truncated_normal_initializer(
              stddev=self.hparams.init_value, seed=self.seed
          )
  
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 9 for calling the BaseModel obj's underlying member method code with example usage: obj._get_initializer() and returns: tf, tf, tf, tf, tf, tf, tf, tf