title: No shape error in tensorflow graph construction but getting shape mismatch error during graph computation
body: <p>There occurs no error in tensorflow graph construction, but I get a shape mismatch error during graph computation in <code>tf.gradients</code> (I guess that the error is in back propagation).</p>
  
  <p>This is the error I get:</p>
  
  <blockquote>
    <p>InvalidArgumentError (see above for traceback):<br>
    Input to reshape is a tensor with 16777216 values, but the requested shape has 4096<br>
    [[Node: gradients/truediv_grad/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0
        /device:GPU:0"](gradients/truediv_grad/Sum, gradients/truediv_grad/Shape)]]</p>
  </blockquote>