title: Error while clipping gradient
body: <p>I was following this <a href="https://www.tensorflow.org/versions/master/api_docs/python/tf/train/Optimizer#processing_gradients_before_applying_them" rel="nofollow noreferrer">tensorflow tutorial</a> for gradient clipping while working with a multilayer perceptron. </p>
  
  <pre><code>grads_and_vars = optimizer.compute_gradients(cross_entropy_loss, trainable_variable)
  capped_grads_and_vars = [(tf.clip_by_global_norm(gv[0],5), gv[1]) for gv in grads_and_vars]
  optimizer.apply_gradients(capped_grads_and_vars)
  </code></pre>
  
  <p>tensorflow shows the following error,</p>
  
  <pre><code>in clip_by_global_norm raise TypeError("t_list should be a sequence")
  </code></pre>
  
  <p><strong>trainable_variable</strong> is a list which I created while creating the model. assume I have a trainable variable(tf.Variable), I add this variable to  <strong><em>trainable_variable</em></strong> list by the following command.</p>
  
  <pre><code>trainable_variable.append(var) #where ver is a trainable variable in tensorflow
  </code></pre>