parameters: (file_pattern,
                                batch_size,
                                features,
                                reader,
                                randomize_input=True,
                                num_epochs=None,
                                queue_capacity=10000,
                                reader_num_threads=1,
                                feature_queue_capacity=100,
                                num_enqueue_threads=2,
                                parse_fn=None,
                                name=None)
docstring: Adds operations to read, queue, batch and parse `Example` protos.
  
    Given file pattern (or list of files), will setup a queue for file names,
    read `Example` proto using provided `reader`, use batch queue to create
    batches of examples of size `batch_size` and parse example given `features`
    specification.
  
    All queue runners are added to the queue runners collection, and may be
    started via `start_queue_runners`.
  
    All ops are added to the default graph.
  
    Args:
      file_pattern: List of files or patterns of file paths containing
          `Example` records. See `tf.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.
      reader: A function or class that returns an object with
        `read` method, (filename tensor) -> (example tensor).
      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() 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.
      feature_queue_capacity: Capacity of the parsed features queue.
      num_enqueue_threads: Number of threads to enqueue the parsed example queue.
        Using multiple threads to enqueue the parsed example queue helps maintain
        a full queue when the subsequent computations overall are cheaper than
        parsing. In order to have predictable and repeatable order of reading and
        enqueueing, such as in prediction and evaluation mode,
        `num_enqueue_threads` should be 1.
      parse_fn: Parsing function, takes `Example` Tensor returns parsed
        representation. If `None`, no parsing is done.
      name: Name of resulting op.
  
    Returns:
      Returns tuple of:
      - `Tensor` of string keys.
      - A dict of `Tensor` or `SparseTensor` objects for each in `features`.
  
    Raises:
      ValueError: for invalid inputs.
docstring_summary: Adds operations to read, queue, batch and parse `Example` protos.
docstring_tokens: Adds operations to read queue batch and parse Example protos .
function: def read_keyed_batch_features(file_pattern,
                                batch_size,
                                features,
                                reader,
                                randomize_input=True,
                                num_epochs=None,
                                queue_capacity=10000,
                                reader_num_threads=1,
                                feature_queue_capacity=100,
                                num_enqueue_threads=2,
                                parse_fn=None,
                                name=None):
    """Adds operations to read, queue, batch and parse `Example` protos.
  
    Given file pattern (or list of files), will setup a queue for file names,
    read `Example` proto using provided `reader`, use batch queue to create
    batches of examples of size `batch_size` and parse example given `features`
    specification.
  
    All queue runners are added to the queue runners collection, and may be
    started via `start_queue_runners`.
  
    All ops are added to the default graph.
  
    Args:
      file_pattern: List of files or patterns of file paths containing
          `Example` records. See `tf.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.
      reader: A function or class that returns an object with
        `read` method, (filename tensor) -> (example tensor).
      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() 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.
      feature_queue_capacity: Capacity of the parsed features queue.
      num_enqueue_threads: Number of threads to enqueue the parsed example queue.
        Using multiple threads to enqueue the parsed example queue helps maintain
        a full queue when the subsequent computations overall are cheaper than
        parsing. In order to have predictable and repeatable order of reading and
        enqueueing, such as in prediction and evaluation mode,
        `num_enqueue_threads` should be 1.
      parse_fn: Parsing function, takes `Example` Tensor returns parsed
        representation. If `None`, no parsing is done.
      name: Name of resulting op.
  
    Returns:
      Returns tuple of:
      - `Tensor` of string keys.
      - A dict of `Tensor` or `SparseTensor` objects for each in `features`.
  
    Raises:
      ValueError: for invalid inputs.
    """
  
    with ops.name_scope(name, 'read_batch_features', [file_pattern]) as scope:
      keys, examples = read_keyed_batch_examples(
          file_pattern,
          batch_size,
          reader,
          randomize_input=randomize_input,
          num_epochs=num_epochs,
          queue_capacity=queue_capacity,
          num_threads=reader_num_threads,
          read_batch_size=batch_size,
          parse_fn=parse_fn,
          name=scope)
      # Parse the example.
      feature_map = parsing_ops.parse_example(examples, features)
      return queue_parsed_features(
          feature_map,
          keys=keys,
          feature_queue_capacity=feature_queue_capacity,
          num_enqueue_threads=num_enqueue_threads,
          name=scope)
function_tokens: def read_keyed_batch_features ( file_pattern , batch_size , features , reader , randomize_input = True , num_epochs = None , queue_capacity = 10000 , reader_num_threads = 1 , feature_queue_capacity = 100 , num_enqueue_threads = 2 , parse_fn = None , name = None ) : with ops . name_scope ( name , 'read_batch_features' , [ file_pattern ] ) as scope : keys , examples = read_keyed_batch_examples ( file_pattern , batch_size , reader , randomize_input = randomize_input , num_epochs = num_epochs , queue_capacity = queue_capacity , num_threads = reader_num_threads , read_batch_size = batch_size , parse_fn = parse_fn , name = scope ) # Parse the example. feature_map = parsing_ops . parse_example ( examples , features ) return queue_parsed_features ( feature_map , keys = keys , feature_queue_capacity = feature_queue_capacity , num_enqueue_threads = num_enqueue_threads , name = scope )