TensorBoard: How to plot histogram for gradients?
<p>TensorBoard had the function to plot histograms of Tensors at session-time. I want a histogram for the gradients during training.</p>

<p><code>tf.gradients(yvars,xvars)</code> returns a list a gradients.</p>

<p>However, <code>tf.histogram_summary('name',Tensor)</code> accepts only Tensors, not lists of Tensors. </p>

<p>For the time being, I made a work-around. I flatten all Tensors to a column vector and concatenate them:</p>

<p><code>for l in xrange(listlength):
   col_vec = tf.reshape(grads[l],[-1,1])
   g = tf.concat(0,[g,col_vec])
grad_hist = tf.histogram_summary("name", g)</code></p>

<p>What would be a better way to plot the histogram for the gradient?</p>

<p>It seems a common thing to do, so I hope TensorFlow would have a dedicated function for this.</p>