code: def test_variance_scaling(self):
      utils.set_random_seed(1337)
      shape = (25, 20)
      scale = 2.0
      seed = 1234
      initializer = initializers.VarianceScaling(
          scale=scale, seed=seed, mode="fan_in"
      )
      values = initializer(shape=shape)
      self.assertEqual(initializer.scale, scale)
      self.assertEqual(initializer.seed, seed)
      self.assertEqual(values.shape, shape)
      self.assertAllClose(
          np.std(backend.convert_to_numpy(values)),
          np.sqrt(scale / 25),
          atol=1e-1,
      )
      self.run_class_serialization_test(initializer)
  
      initializer = initializers.VarianceScaling(
          scale=scale, seed=seed, mode="fan_out"
      )
      values = initializer(shape=shape)
      self.assertEqual(initializer.scale, scale)
      self.assertEqual(initializer.seed, seed)
      self.assertEqual(values.shape, shape)
      self.assertAllClose(
          np.std(backend.convert_to_numpy(values)),
          np.sqrt(scale / 20),
          atol=1e-1,
      )
      self.run_class_serialization_test(initializer)
  
file_path: keras/keras/initializers/random_initializers_test.py
imports: import numpy
  from keras import backend
  from keras import initializers
  from keras import testing
  from keras import utils
label_desc: Use image node_id 3 for calling the InitializersTest obj's underlying member method code with example usage: obj.test_variance_scaling() without return types