class_docstr: Performs weight normalization.
  
  This wrapper reparameterizes a layer by decoupling the weight's
  magnitude and direction.
  This speeds up convergence by improving the
  conditioning of the optimization problem.
  
  See [Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks](https://arxiv.org/abs/1602.07868).
  
  Wrap `tf.keras.layers.Conv2D`:
  
  >>> x = np.random.rand(1, 10, 10, 1)
  >>> conv2d = WeightNormalization(tf.keras.layers.Conv2D(2, 2), data_init=False)
  >>> y = conv2d(x)
  >>> y.shape
  TensorShape([1, 9, 9, 2])
  
  Wrap `tf.keras.layers.Dense`:
  
  >>> x = np.random.rand(1, 10, 10, 1)
  >>> dense = WeightNormalization(tf.keras.layers.Dense(10), data_init=False)
  >>> y = dense(x)
  >>> y.shape
  TensorShape([1, 10, 10, 10])
  
  Args:
    layer: A `tf.keras.layers.Layer` instance.
    data_init: If `True` use data dependent variable initialization.
  Raises:
    ValueError: If not initialized with a `Layer` instance.
    ValueError: If `Layer` does not contain a `kernel` of weights.
    NotImplementedError: If `data_init` is True and running graph execution.
docstr: Call `Layer`
docstr_tok: ["Call","`","Layer","`"]
code: def call(self, inputs):
      """Call `Layer`"""
  
      def _do_nothing():
          return tf.identity(self.g)
  
      def _update_weights():
          # Ensure we read `self.g` after _update_weights.
          with tf.control_dependencies(
              self._initialize_weights(inputs)
          ):
              return tf.identity(self.g)
  
      g = tf.cond(self._initialized, _do_nothing, _update_weights)
  
      with tf.name_scope("compute_weights"):
          # Replace kernel by normalized weight variable.
          kernel = (
              tf.nn.l2_normalize(self.v, axis=self.kernel_norm_axes) * g
          )
  
          if self.is_rnn:
              self.layer.cell.recurrent_kernel = kernel
              update_kernel = tf.identity(
                  self.layer.cell.recurrent_kernel
              )
          else:
              self.layer.kernel = kernel
              update_kernel = tf.identity(self.layer.kernel)
  
          # Ensure we calculate result after updating kernel.
          with tf.control_dependencies([update_kernel]):
              outputs = self.layer(inputs)
              return outputs
  
file_path: addons/tensorflow_addons/layers/wrappers.py
imports: import logging
  import tensorflow
  from typeguard import typechecked
label_desc: Use image node_id 3 for calling the WeightNormalization obj's underlying member method code with example usage: obj.call(inputs) and returns: tf, tf, outputs