title: Do we need to add the regularization loss into the total loss in tensorflow models?
body: <p>In the model definition, I used the <code>kernel_regularizer=tf.contrib.layers.l2_regularizer(scale=0.00001)</code> into the <code>tf.layers.conv2d()</code> to regularize the convolution kernels in each convolution layer. </p>
  
  <p>My question is: to compute the total loss of the whole network for some batch inputs, do we need to manually add the regularization loss as follows:</p>
  
  <pre><code>reg_losses = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)
  reg_constant = 0.01  # Choose an appropriate one.
  loss = my_normal_loss + reg_constant * sum(reg_losses)
  </code></pre>
  
  <p>And if yes, how to determine the <code>reg_constant</code> above? What's the relationship between the <code>scale</code> and the <code>reg_constant</code>? Thanks.</p>