title: Boolean expression in Tensorflow CIFAR-10 tutorial
body: <p>I'm reading the codes about a TF official example about cifar10 on <a href="https://github.com/tensorflow/models/blob/master/official/resnet/cifar10_main.py" rel="nofollow noreferrer">https://github.com/tensorflow/models/blob/master/official/resnet/cifar10_main.py</a>
  and I have some questions:</p>
  
  <ul>
  <li>In the function <strong><code>input_fn</code></strong>, what does </li>
  </ul>
  
  <blockquote>
    <p>num_images = is_training and _NUM_IMAGES['train'] or
    _NUM_IMAGES['validation']</p>
  </blockquote>
  
  <p>... mean? How can we get the right size of data while training and validating through this function?</p>
  
  <ul>
  <li>In the function <strong><code>main</code></strong>, there's a similar one</li>
  </ul>
  
  <blockquote>
    <p>input_function = FLAGS.use_synthetic_data and get_synth_input_fn() or
    input_fn</p>
  </blockquote>
  
  <p>Again, I don't know how it works.</p>