Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python tf.contrib.learn.read\u批处理\u功能的输入参数_Python_Python 3.x_Tensorflow - Fatal编程技术网

Python tf.contrib.learn.read\u批处理\u功能的输入参数

Python tf.contrib.learn.read\u批处理\u功能的输入参数,python,python-3.x,tensorflow,Python,Python 3.x,Tensorflow,我正在研究这些tensorflow,它们在tensorflow中实现了一个LSTM。在浏览代码时,我在第38行tf.contrib.learn.read\u batch\u功能中遇到了这个函数。我查阅了tf.contrib.learn.read\u批处理功能的文档。这就是我得到的- file_pattern: List of files or pattern of file paths containing Example records. batch_size: An int or scal

我正在研究这些tensorflow,它们在tensorflow中实现了一个LSTM。在浏览代码时,我在第38行tf.contrib.learn.read\u batch\u功能中遇到了这个函数。我查阅了tf.contrib.learn.read\u批处理功能的文档。这就是我得到的-

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. 有几个输入参数,我不能理解,并希望有人能帮助我与它

“随机化”输入参数。这是否意味着它将洗牌整个数据集

对于num_epochs,如果我指定None,这是否意味着我的输入将继续馈送到model_fn。在这种情况下,培训不会停止。这对我来说毫无意义。我想我在这里的某个地方出了问题

队列容量我不知道这意味着什么

非常感谢您对这些问题的帮助。提前谢谢

randomize\u输入意味着文件名是随机的,并且使用一个随机队列在内存中对示例进行一次随机移动

对于num_epoch,训练可能会由于其他原因而停止,通常训练会在给定的全局_步停止,而与输入函数无关

对于队列容量,TensorFlow在内部使用队列缓冲I/O以获得最大吞吐量。此参数允许您控制该队列的大小