tf.contrib.learn.read_batch_record_features
Reads TFRecord, queues, batches and parses Example proto. (deprecated)
tf.contrib.learn.read_batch_record_features(
file_pattern, batch_size, features, randomize_input=True, num_epochs=None,
queue_capacity=10000, reader_num_threads=1, name='dequeue_record_examples'
)
See more detailed description in read_examples.
| Args | |
|---|---|
file_pattern | List of files or patterns of file paths containing Example records. See tf.io.gfile.glob for pattern rules. |
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.compat.v1.local_variables_initializer() and run the op in a session. |
queue_capacity | Capacity for input queue. |
reader_num_threads | The number of threads to read examples. In order to have predictable and repeatable order of reading and enqueueing, such as in prediction and evaluation mode, reader_num_threads should be 1. |
name | Name of resulting op. |
| Returns | |
|---|---|
A dict of Tensor or SparseTensor objects for each in features. |
| Raises | |
|---|---|
ValueError | for invalid inputs. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/learn/read_batch_record_features