title: Does tf.nn.l2_loss and tf.contrib.layers.l2_regularizer serve the same purpose of adding L2 regularization in tensorflow?
body: <p>It seems L2 regularization in tensorflow can be implemented in 2 ways:</p>
  
  <p>(i) using tf.nn.l2_loss or
  (ii) using tf.contrib.layers.l2_regularizer</p>
  
  <p>Will these both approaches serve the same purpose? If they differ, what do they differ at?</p>