title: Is it possible to acquire an intermediate gradient? (Tensorflow)
body: <p>When using gradient tape you can calculate the gradient after using:</p>
  <pre><code>with tf.GradientTape() as tape:
          out = model(x, training=True)
          out = tf.reshape(out, (num_img, 1, 10)) # Resizing 
          loss = tf.keras.losses.categorical_crossentropy(y, out) 
          gradient = tape.gradient(loss, model.trainable_variables)
  </code></pre>
  <p>However, this returns the, in the case of the cifar10 inputs, gradients of the input images.
  Is there a way to access the gradients of an intermediate step, such that they have been through &quot;some&quot; training?</p>