title: 'Operation' object has no attribute 'compute_gradients' - tensorflow
body: <p>I want to clip gradient value when use LSTM model.</p>
  
  <p>I calculate the gradient by using <code>optimizer.compute_gradients()</code> and got the error. Here is my code:</p>
  
  <pre><code>self.optimizer =  tf.train.GradientDescentOptimizer(self.lr).minimize(self.loss)
  
  gvs = self.optimizer.compute_gradients(self.loss)
  </code></pre>
  
  
  
  
  
  <p>Error message:</p>
  
  <blockquote>
    <p>'Operation' object has no attribute 'compute_gradients'</p>
  </blockquote>
  
  <p>How to solve this problem or is there any method to clip the value in tensorflow?</p>