How to use Tensorflow tf.nn.Conv2d simultaneously for training and prediction?
You need to set your Placeholder like follows
 tf.placeholder(shape=(None,160,128,3) ....) , with having None in the first dimension , your placeholder will be flexible to any value you feed either 1 or 100.
I am currently diving deeper into tensorflow and I am a bit puzzled with the proper use of tf.nn.Conv2d(input, filter, strides, padding). Although it looks simple at first glance I cannot get my hear around the following issue:
The use of filter, strides, padding is clear to me. However what is not clear is the correct application of the input. 
I am coming from a reinforcement learning Atari (Pong) problem in which I want to use the network for batch training AND (with a certain probability) also for predictions in each step. That means, for training I am feeding the network a full batch of let's say 100 , each single unit consisting of 3 frames with size 160, 128. Using the NHWC format of tensorflow my input to input would be a tf.placeholder of shape (100,160,128,3). So for training I am feeding 100 160x128x3 packages.
However, when predicting outputs from my network (going up or down with the pong paddle) in a certain situation I am only feeding the network one package of 160x128x3 (i.e. one package of three frames). Now this is where tensorflow crashes. It expects (100,160,128,3) but receives (1,160,128,3). 
Now I am puzzled. I obviously do not want to set the batch size to 1 and always feed only one package for training. But how can I proceed here? How shall this be implemented with tf.nn.conv2d? 
Very much appreciated if someone cann steer me into the right direction here
Thank you in advance for your help!
Kevin