code: def test_dense_weightnorm(self):
      x, x_mask = self.get_data()
      x = tf.random_normal(
          (BATCH_SIZE, TARGET_LENGTH, HIDDEN_SIZE), mean=0.0, stddev=1.0
      )
      y = gops.dense_weightnorm(
          "wn", x, N_CHANNELS, x_mask, init_scale=1.0, init=True
      )
  
      y_nopad = tf.boolean_mask(y, x_mask)
      mean, var = tf.nn.moments(y_nopad, axes=[0])
      self.evaluate(tf.global_variables_initializer())
      x, x_mask, y, y_nopad, mean, var = self.evaluate(
          [x, x_mask, y, y_nopad, mean, var]
      )
      self.assertEqual(y.shape, (BATCH_SIZE, TARGET_LENGTH, N_CHANNELS))
      self.assertTrue(np.allclose(mean, 0.0, atol=1e-5))
      self.assertTrue(np.allclose(var, 1.0, atol=1e-5))
  
file_path: tensor2tensor/tensor2tensor/layers/transformer_glow_layers_ops_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from tensor2tensor.layers import transformer_glow_layers_ops
  from tensor2tensor.models import transformer
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the TransformerFlowOpsTest obj's underlying member method code with example usage: obj.test_dense_weightnorm() without return types