title: conv2d_transpose is dependent on batch_size when making predictions
body: <p>I have a neural network currently implemented in tensorflow, but I am having a problem making predictions after training, because I have a conv2d_transpose operations, and the shapes of these ops are dependent on the batch size. I have a layer that requires output_shape as an argument:</p>
  
  <pre><code>def deconvLayer(input, filter_shape, output_shape, strides):
      W1_1 = weight_variable(filter_shape)
  
      output = tf.nn.conv2d_transpose(input, W1_1, output_shape, strides, padding="SAME")
  
      return output
  </code></pre>
  
  <p>That is actually used in a larger model I have constructed like the following:</p>
  
  <pre><code> conv3 = layers.convLayer(conv2['layer_output'], [3, 3, 64, 128], use_pool=False)
  
   conv4 = layers.deconvLayer(conv3['layer_output'],
                                      filter_shape=[2, 2, 64, 128],
                                      output_shape=[batch_size, 32, 40, 64],
                                      strides=[1, 2, 2, 1])
  </code></pre>
  
  <p>The problem is, if I go to make a prediction using the trained model, my test data has to have the same batch size, or else I get the following error.</p>
  
  <pre><code>tensorflow.python.framework.errors.InvalidArgumentError: Conv2DBackpropInput: input and out_backprop must have the same batch size
  </code></pre>
  
  <p>Is there some way that I can get a prediction for an input with variable batch size? When I look at the trained weights, nothing seems to depend on batch size, so I can't see why this would be a problem.</p>