title: tensorflow.gradients gives None value
body: <p><code>model</code> is my trained Keras residual model. I'm trying to calculate the gradient of the loss w.r.t an input tensor, however:</p>
  
  <pre><code>tf.gradients(mse(model.predict(x), y), x[0])
  </code></pre>
  
  <p>(gradient of loss w.r.t an input tensor), gives me:</p>
  
  <pre><code>[None].
  </code></pre>
  
  <p>What does <code>None</code> here mean and how can I compute these gradients?</p>