docstr: Xavier Glorot normal.
docstr_tok: ["Xavier","Glorot","normal","."]
code: def test_xavier_normal(self):
      """Xavier Glorot normal."""
      for s in (
          (4, 3, 2, 10000),
          (12, 2, 10000),
          (24, 10000),
          (32, 10000),
      ):
          for gain in (1, 2):
              init = np.asarray(
                  objax.nn.init.xavier_normal(s, gain=gain)
              )
              std = np.sqrt(2 / (np.prod(s[:-1]) + s[-1]))
              self.assertAlmostEqual(
                  init.mean(), 0, delta=1e-2, msg=(s, gain)
              )
              self.assertAlmostEqual(
                  init.std(), std * gain, delta=1e-2, msg=(s, gain)
              )
  
file_path: objax/tests/nn_init.py
imports: import unittest
  import numpy
  import scipy.stats
  import objax
label_desc: Use image node_id 4 for calling the TestNNInit obj's underlying member method code with example usage: obj.test_xavier_normal() without return types