title: TensorFlow placeholder variable for integer or boolean isn't working
body: <p>I am using the following code snippet in TensorFlow to conditionally pull data from one source or another:</p>
  
  <pre><code>if __name__ == '__main__':
  
  
  
  with tf.device("/gpu:0"):
  
      with tf.Graph().as_default():
  
          with tf.variable_scope("cifar_conv_model"):
  
              is_train = tf.placeholder(tf.int32) # placeholder for whether to pull from train or val data
              keep_prob = tf.placeholder(tf.float32) # dropout probability
  
              x, y = tf.cond(tf.equal(is_train, tf.constant(1, dtype=tf.int32)), distorted_inputs, inputs)
  
              output = inference(x, keep_prob)
  
              cost = loss(output, y)
  
              global_step = tf.Variable(0, name='global_step', trainable=False)
  
              train_op = training(cost, global_step)
  
              eval_op = evaluate(output, y)
  
              summary_op = tf.merge_all_summaries()
  
              saver = tf.train.Saver()
              summary_writer = tf.train.SummaryWriter("conv_cifar_logs/", graph_def=sess.graph_def)
              init_op = tf.initialize_all_variables()
  
              sess = tf.Session()
  
              sess.run(init_op)
  
              tf.train.start_queue_runners(sess=sess)
  
              # Training cycle
              for epoch in range(training_epochs):
  
                  avg_cost = 0.
                  total_batch = int(cifar10_input.NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN/batch_size)
                  # Loop over all batches
                  for i in range(total_batch):
                      # Fit training using batch data
                      _, new_cost = sess.run([train_op, cost], feed_dict={is_train: 1, keep_prob: 0.5})
                      # Compute average loss
                      avg_cost += new_cost/total_batch
                      print "Epoch %d, minibatch %d of %d. Average cost = %0.4f." %(epoch, i, total_batch, avg_cost)
  </code></pre>
  
  <p>I keep obtaining error vomit as threads spazz out, but the recurring theme is the following error:</p>
  
  <pre><code>InvalidArgumentError: You must feed a value for placeholder tensor 'cifar_conv_model/Placeholder' with dtype int32
       [[Node: cifar_conv_model/Placeholder = Placeholder[dtype=DT_INT32, shape=[], _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
       [[Node: cifar_conv_model/Placeholder/_151 = _HostRecv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_407_cifar_conv_model/Placeholder", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
  Caused by op u'cifar_conv_model/Placeholder', defined at:
    File "convnet_cifar.py", line 134, in &lt;module&gt;
      is_train = tf.placeholder(tf.int32) # placeholder for whether to pull from train or val data
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 743, in placeholder
      name=name)
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 607, in _placeholder
      name=name)
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 655, in apply_op
      op_def=op_def)
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2040, in create_op
      original_op=self._default_original_op, op_def=op_def)
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1087, in __init__
      self._traceback = _extract_stack()
  </code></pre>
  
  <p>Any help would very much be appreciated!</p>