title: Tensorflow, select operation giving error
body: <p>I need my model to behave differently during training vs testing.  I am trying to build I sequence to sequence model and I want to feed the expected output into the decoder when training and the actual output when I am testing.  I defined the following placeholder which should contain a scaler value.  </p>
  
  <pre><code>training = tf.placeholder(tf.bool, None, 'training')
  </code></pre>
  
  <p>In my decoder I use the following select statement which returns all zeros in the first time step but selects between the last output and expected output depending on if it is training or not.</p>
  
  <pre><code>last_step = tf.select(training, getTimeStep(expected_output, t - 1), decoder_outputs[t - 1])if t else tf.zeros((BATCH_SIZE, 128))
  </code></pre>
  
  <p>When I run the model in training mode I use the following where I set training to True.</p>
  
  <pre><code>sess.run([accuracy, cross_entropy, train_step], feed_dict = {input_tensor: x_train, expected_output: y_train, training: True})
  </code></pre>
  
  <p>When it runs I get the following error.</p>
  
  <pre><code>tensorflow.python.framework.errors.InvalidArgumentError: Inputs to operation decoder/Select of type Select must have the same size and shape.  Input 0: [] != input 1: [32,128]
  </code></pre>
  
  <p>It seems the condition needs to be the same size as the tensors I am selecting between.  However, I want to select one expression or another, not an element wise select.  Is there a better way to do this?  I figured select should just broadcast the boolean.  I can tile it but that seems somewhat inefficient.</p>