我正在通過這些tensorflow codes實現張量流中的LSTM。在通過代碼時,我遇到了這個函數(在input_fn code-第38行)tf.contrib.learn.read_batch_features
。我查閱了tf.contrib.learn.read_batch_features
here的文檔。這是我得到 -tf.contrib.learn.read_batch_features的輸入參數
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.
有幾個輸入參數,我無法理解,並希望有人可以幫助我。
randomize_input
參數。這是否意味着它會洗牌整個數據集?對於
num_epochs
,如果我指定None
是否意味着我的input_fn
將保持供給到model_fn
。在那種情況下,培訓不會停止。這對我沒有意義。我想我在這裏的某處出錯了。queue_capacity
我不知道這意味着什麼
將不勝感激圍繞着這些問題的任何幫助。提前致謝!