parameters: (self, shape, stddev, wd, decoder=False)
return_statement: return var
docstring: Helper to create an initialized Variable with weight decay.
  
          Note that the Variable is initialized with a truncated normal
          distribution.
          A weight decay is added only if one is specified.
  
          Args:
            name: name of the variable
            shape: list of ints
            stddev: standard deviation of a truncated Gaussian
            wd: add L2Loss weight decay multiplied by this float. If None, weight
                decay is not added for this Variable.
  
          Returns:
            Variable Tensor
docstring_summary: Helper to create an initialized Variable with weight decay.
docstring_tokens: Helper to create an initialized Variable with weight decay .
function: def _variable_with_weight_decay(self, shape, stddev, wd, decoder=False):
          """Helper to create an initialized Variable with weight decay.
  
          Note that the Variable is initialized with a truncated normal
          distribution.
          A weight decay is added only if one is specified.
  
          Args:
            name: name of the variable
            shape: list of ints
            stddev: standard deviation of a truncated Gaussian
            wd: add L2Loss weight decay multiplied by this float. If None, weight
                decay is not added for this Variable.
  
          Returns:
            Variable Tensor
          """
  
          initializer = tf.truncated_normal_initializer(stddev=stddev)
          var = tf.get_variable('weights', shape=shape,
                                initializer=initializer)
  
          if wd and (not tf.get_variable_scope().reuse):
              weight_decay = tf.mul(tf.nn.l2_loss(var), wd, name='weight_loss')
              if not decoder:
                  tf.add_to_collection('losses', weight_decay)
              else:
                  tf.add_to_collection('dec_losses', weight_decay)
          _variable_summaries(var)
          return var
function_tokens: def _variable_with_weight_decay ( self , shape , stddev , wd , decoder = False ) : initializer = tf . truncated_normal_initializer ( stddev = stddev ) var = tf . get_variable ( 'weights' , shape = shape , initializer = initializer ) if wd and ( not tf . get_variable_scope ( ) . reuse ) : weight_decay = tf . mul ( tf . nn . l2_loss ( var ) , wd , name = 'weight_loss' ) if not decoder : tf . add_to_collection ( 'losses' , weight_decay ) else : tf . add_to_collection ( 'dec_losses' , weight_decay ) _variable_summaries ( var ) return var