code: def test_xavier(self):
      std = np.sqrt(2.0 / np.sum(self.shape))
      limit = np.sqrt(3.0) * std
      self.assertTrue(np.min(xavier_uniform(self.shape)) >= -limit)
      self.assertTrue(np.max(xavier_uniform(self.shape)) <= limit)
  
      seed = np.random.randint(123)
      x_norm = xavier_normal(self.shape, random_state=seed)
      np.random.seed(seed)
      npt.assert_array_equal(
          x_norm,
          np.random.normal(
              0, np.sqrt(2.0 / np.sum(self.shape)), self.shape
          ).astype(np.float32),
      )
  
file_path: cornac/tests/cornac/utils/test_init_utils.py
imports: import unittest
  import numpy.testing
  from cornac.utils.init_utils import *
label_desc: Use image node_id 6 for calling the TestInitUtils obj's underlying member method code with example usage: obj.test_xavier() without return types