code: def xavier(uniform=True, seed=None, dtype=tf.float32):
      """Xavier.
  
      Returns an initializer performing "Xavier" initialization for weights.
  
      This initializer is designed to keep the scale of the gradients roughly the
      same in all layers. In uniform distribution this ends up being the range:
      `x = sqrt(6. / (in + out)); [-x, x]` and for normal distribution a standard
      deviation of `sqrt(3. / (in + out))` is used.
  
      Arguments:
          uniform: Whether to use uniform or normal distributed random
              initialization.
          seed: A Python integer. Used to create random seeds. See
              `set_random_seed` for behavior.
          dtype: The data type. Only floating point types are supported.
  
      Returns:
          An initializer for a weight matrix.
  
      References:
          Understanding the difficulty of training deep feedforward neural
          networks. International conference on artificial intelligence and
          statistics. Xavier Glorot and Yoshua Bengio (2010).
  
      Links:
          [http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf]
          (http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf)
      """
      try:
          from tensorflow.contrib.layers.python.layers.initializers import (
              xavier_initializer,
          )
      except ImportError:
          raise NotImplementedError(
              "'xavier_initializer' not supported, "
              "please update TensorFlow."
          )
      return xavier_initializer(uniform=uniform, seed=seed, dtype=dtype)
  
file_path: tflearn/tflearn/initializations.py
imports: from __future__ import division, print_function, absolute_import
  import math
  import tensorflow.compat.v1
  from .utils import get_from_module
label_desc: Use image node_id 7 for calling a global function with example usage: xavier(uniform, seed, dtype) and returns: xavier_initializer