docstr: Calculate values of initialized vars from Salimans and Kingma (2016).
docstr_tok: ["Calculate","values","of","initialized","vars","from","Salimans","and","Kingma","(","2016",")","."]
code: def _calculate_true_initial_variables_dense(
      self, inputs, data_dim, num_hidden
  ):
      """Calculate values of initialized vars from Salimans and Kingma (2016)."""
      init_kernel = np.ones((data_dim, num_hidden))
      normalized_features = np.matmul(
          inputs, init_kernel
      ) / np.linalg.norm(init_kernel, axis=0)
      true_init_g = 1.0 / np.sqrt(
          np.var(normalized_features, axis=0) + 1e-10
      )
      true_init_bias = -np.mean(normalized_features) * true_init_g
      return true_init_g, true_init_bias
  
imports: import tempfile
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.layers import weight_norm
label_desc: Use image node_id 4 for calling the WeightNormTest obj's underlying member method code with example usage: obj._calculate_true_initial_variables_dense(inputs, data_dim, num_hidden) and returns: true_init_g,  true_init_bias