def test_wrong_dtype(self):
    with self.assertRaisesRegexp(
        TypeError, 'Cannot create initializer for non-floating point type.'):
      initializers.variance_scaling_initializer(dtype=dtypes.int32)
    initializer = initializers.variance_scaling_initializer()
    with self.assertRaisesRegexp(
        TypeError, 'Cannot create initializer for non-floating point type.'):
      initializer([], dtype=dtypes.int32)