I am working through these tensorflow codes which implement a LSTM in tensorflow. While going through the codes, I came across this function (in input_fn code - line 38) tf.contrib.learn.read_batch_features. I looked up the documentation of tf.contrib.learn.read_batch_features here. This is what I got -
file_pattern: List of files or pattern of file paths containing Example records. batch_size: An int or scalar Tensor specifying the batch size to use. features: A dict mapping feature keys to FixedLenFeature or VarLenFeature values. randomize_input: Whether the input should be randomized. num_epochs: Integer specifying the number of times to read through the dataset. If None, cycles through the dataset forever. NOTE - If specified, creates a variable that must be initialized, so call tf.local_variables_initializer() as shown in the tests. queue_capacity: Capacity for input queue. reader_num_threads: The number of threads to read examples. name: Name of resulting op.
There are few input parameters that I am not able to understand and was hoping someone could help me with it.
The
randomize_inputparameter. Does it mean it will shuffle the entire dataset?For
num_epochs, if I specifyNonedoes it mean that myinput_fnwill keep feeding to themodel_fn. In that case the training wouldn't stop. This doesn't make sense to me. I guess I'm going wrong somewhere here.queue_capacityI am not sure what this means
Would appreciate any help around these questions. Thanks in advance!