title: LookupError: No gradient defined for operation type: ResizeNearestNeighborGrad
body: <p>I am trying to add <a href="https://arxiv.org/abs/1704.00028" rel="nofollow noreferrer">Wasserstein gradient penalty</a> into loss calculation of discriminator. Without adding this penalty everything works fine. But when this part is being added, It gives an error something similar to this:</p>
  
  <pre><code>      File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients_impl.py", line 737, in _GradientsHelper
          (op.name, op.type))
        LookupError: No gradient defined for operation 'gradients/discriminator/decoder/ResizeNearestNeighbor_grad/ResizeNearestNeighborGrad' (op type: ResizeNearestNeighborGrad)
  </code></pre>
  
  <p>Here is the part of the source code which is used to calculate Wasserstein gradient penalty:</p>
  
  <pre><code>    differences = tf.subtract(images_fake, images_real)
      alpha_shape = [params.batch_size] + [1] * (differences.shape.ndims - 1)
      alpha = tf.random_uniform(shape=alpha_shape, minval=0., maxval=1.)
      interpolates = images_real + (alpha * differences)
      d_model = Model(params, args.mode, interpolates, reuse_variables, images_fake, 1)
      gradients = tf.gradients(d_model.logistic_linear, [interpolates])[0]
      slopes = tf.sqrt(tf.reduce_sum(tf.square(gradients), reduction_indices=[1]))
      gradient_penalty = tf.reduce_mean((slopes - 1.) ** 2)
      _gradient_penalty = 10 * gradient_penalty
  </code></pre>
  
  <p>But it throw above mentioned error when below line is bening executing. </p>
  
  <pre><code>   d_optim = opt_discriminator_step.minimize(total_loss_discriminator, var_list=d_vars)
  </code></pre>
  
  <p>Still, I have a no clue how to get on with this issue. Any comments or answers are welcome.</p>