title: how to use tf.contrib.image.rotate in loss function?
body: <p>I use the tf.conbrib.image.rotate in loss function, and an error happen:</p>
  
  <pre><code>No gradients provided for any variable, check your graph for ops that do not support gradients,
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>import tensorflow as tf
  
  image_tensor = tf.placeholder(dtype=tf.float32, shape=[None,320,320,1])
  target_tensor = tf.placeholder(dtype=tf.float32, shape=[None,320,320,1])
  s = tf.concat([image_tensor, target_tensor],axis=3)
  s = tf.layers.flatten(s)
  w = tf.get_variable(initializer=tf.truncated_normal([204800,1], stddev=0.1),name='w')
  b = tf.get_variable(initializer=tf.truncated_normal([1], stddev=0.1),name='b')
  a = tf.matmul(s,w)+b
  diff = tf.contrib.image.rotate(image_tensor, a[:,0], interpolation='BILINEAR') - target_tensor
  loss = tf.reduce_sum(tf.square(diff))
  
  optimizer = tf.train.GradientDescentOptimizer(0.001)
  train = optimizer.minimize(loss)
  </code></pre>
  
  <p>My tensorflow is: 1.4.0, and my computer is Win10.</p>
  
  <p>By the way, how can I rotate the 3D image in tensorflow? the tf.conbrib.image.rotate only work for 2D image. </p>