(FLAGS)
return initializer
Get variable intializer.
Get variable intializer.
Get variable intializer .
def _get_initializer(FLAGS):
  """Get variable intializer."""
  if FLAGS.init == "uniform":
    initializer = tf.initializers.random_uniform(
        minval=-FLAGS.init_range,
        maxval=FLAGS.init_range,
        seed=None)
  elif FLAGS.init == "normal":
    initializer = tf.initializers.random_normal(
        stddev=FLAGS.init_std,
        seed=None)
  else:
    raise ValueError("Initializer {} not supported".format(FLAGS.init))
  return initializer
def _get_initializer ( FLAGS ) : if FLAGS . init == "uniform" : initializer = tf . initializers . random_uniform ( minval = - FLAGS . init_range , maxval = FLAGS . init_range , seed = None ) elif FLAGS . init == "normal" : initializer = tf . initializers . random_normal ( stddev = FLAGS . init_std , seed = None ) else : raise ValueError ( "Initializer {} not supported" . format ( FLAGS . init ) ) return initializer