I'm reading the codes about a TF official example about cifar10 on https://github.com/tensorflow/models/blob/master/official/resnet/cifar10_main.py and I have some questions:
- In the function
input_fn
, what does
num_images = is_training and _NUM_IMAGES['train'] or _NUM_IMAGES['validation']
... mean? How can we get the right size of data while training and validating through this function?
- In the function
main
, there's a similar one
input_function = FLAGS.use_synthetic_data and get_synth_input_fn() or input_fn
Again, I don't know how it works.