def build_fake_input_fns(batch_size):
num_words = <NUM_LIT:1000><EOL>vocabulary = [str(i) for i in range(num_words)]<EOL>random_sample = np.random.randint(<EOL><NUM_LIT:10>, size=(batch_size, num_words)).astype(np.float32)<EOL>def train_input_fn():<EOL><INDENT>dataset = tf.data.Dataset.from_tensor_slices(random_sample)<EOL>dataset = dataset.batch(batch_size).repeat()<EOL>return tf.compat.v1.data.make_one_shot_iterator(dataset).get_next()<EOL><DEDENT>def eval_input_fn():<EOL><INDENT>dataset = tf.data.Dataset.from_tensor_slices(random_sample)<EOL>dataset = dataset.batch(batch_size)<EOL>return tf.compat.v1.data.make_one_shot_iterator(dataset).get_next()<EOL><DEDENT>return train_input_fn, eval_input_fn, vocabulary<EOL>
Builds fake data for unit testing.