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

    self.assertIsNone(regularizers.l1_regularizer(0.)(None))