def build_input_fns(data_dir, batch_size):
<EOL>def train_input_fn():<EOL><INDENT>dataset = static_mnist_dataset(data_dir, "<STR_LIT:train>")<EOL>dataset = dataset.shuffle(<NUM_LIT>).repeat().batch(batch_size)<EOL>return tf.compat.v1.data.make_one_shot_iterator(dataset).get_next()<EOL><DEDENT>def eval_input_fn():<EOL><INDENT>eval_dataset = static_mnist_dataset(data_dir, "<STR_LIT>")<EOL>eval_dataset = eval_dataset.batch(batch_size)<EOL>return tf.compat.v1.data.make_one_shot_iterator(eval_dataset).get_next()<EOL><DEDENT>return train_input_fn, eval_input_fn<EOL>
Builds an Iterator switching between train and heldout data.