title: Tensorflow GAN No gradients provided for any variable
body: <p>I'm trying to build a LSTM-GAN in tensorflow.</p>
  
  <p>Only in the descriminator net, when I try to calculate the loss i get the error </p>
  
  <p><code>ValueError: No gradients provided for any variable, check your graph for ops that do not support gradients, between variables ["&lt;tf.Variable 'd_w:0' shape=(128, 1) dtype=float32_ref&gt;", "&lt;tf.Variable 'd_b:0' shape=(1,) dtype=float32_ref&gt;"] and loss Tensor("Neg:0", shape=(), dtype=float32).</code></p>
  
  <p>the descriminator net looks like this</p>
  
  <pre><code>## Descriminator net
  x = tf.placeholder("float", [None, time_steps, num_inputs], name='x')
  d_w = tf.Variable(tf.random_normal([num_units,1]), name='d_w')
  d_b = tf.Variable(tf.random_normal([1]), name='d_b')
  
  des_vars = [d_w, d_b]
  
  def descriminator(x):
      inp = tf.unstack(x, time_steps, 1)
      lstm_layer = rnn.BasicLSTMCell(num_units,forget_bias=1, reuse=tf.AUTO_REUSE)
      outputs, _ = rnn.static_rnn(lstm_layer, inp, dtype='float32')
      descriminator_logit = tf.nn.sigmoid(tf.matmul(outputs[-1],g_w)+g_b)
  
      return descriminator_logit
  
  g_prediction = generator(Z)
  d_real = descriminator(x)
  d_fake = descriminator(Y)
  
  
  d_loss = -tf.reduce_mean( tf.log(d_real) + tf.log(1. - d_fake) )
  g_loss = -tf.reduce_mean( tf.log(d_fake) )
  
  g_optimizer = tf.train.AdamOptimizer().minimize(g_loss, var_list=gen_vars)
  d_optimizer = tf.train.AdamOptimizer().minimize(d_loss, var_list=des_vars)
  </code></pre>
  
  <p>I'm not sure which part of this is breaking it.. I was thinking it could be the d_fake Variavle. <code>Y</code> is a <code>tf.placeholder</code> with the same shape as x but is reformatted so it takes the output of the generator net (this is done inside the <code>tf.session()</code> </p>
  
  <p>any idea why this is breaking?</p>