class_docstr: 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.
  
  Weight Normalization: A Simple Reparameterization to Accelerate
  Training of Deep Neural Networks: https://arxiv.org/abs/1602.07868
  Tim Salimans, Diederik P. Kingma (2016)
  
  WeightNorm wrapper works for keras and tf layers.
  
  ```python
    net = WeightNorm(tf.keras.layers.Conv2D(2, 2, activation='relu'),
           input_shape=(32, 32, 3), data_init=True)(x)
    net = WeightNorm(tf.keras.layers.Conv2D(16, 5, activation='relu'),
                     data_init=True)
    net = WeightNorm(tf.keras.layers.Dense(120, activation='relu'),
                     data_init=True)(net)
    net = WeightNorm(tf.keras.layers.Dense(n_classes),
                     data_init=True)(net)
  ```
  
  Arguments:
    layer: a 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
code: def __init__(self, layer, data_init=False, **kwargs):
      if not isinstance(layer, Layer):
          raise ValueError(
              "Please initialize `WeightNorm` layer with a "
              "`Layer` instance. You passed: {input}".format(
                  input=layer
              )
          )
  
      if not context.executing_eagerly() and data_init:
          raise NotImplementedError(
              "Data dependent variable initialization is not available for "
              "graph execution"
          )
  
      self.initialized = True
      if data_init:
          self.initialized = False
  
      self.layer_depth = None
      self.norm_axes = None
      super(WeightNorm, self).__init__(layer, **kwargs)
      self._track_trackable(layer, name="layer")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.keras.layers import Wrapper
  from tensorflow.python.layers.convolutional import Conv1D
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.keras.engine.base_layer import Layer
  from tensorflow.python.eager import context
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.keras import initializers
  from tensorflow.python.keras.engine.base_layer import InputSpec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.framework import ops
label_desc: Use image node_id 1 to create a new WeightNorm object from inherited base classes: Wrapper with example: obj = WeightNorm(layer, data_init)