class_docstr: Wrapper for dataset generation given a read function
class_docstr_tok: ["Wrapper","for","dataset","generation","given","a","read","function"]
docstr: Constructs a Reader instance
  
  Args:
      read_fn: Input function returning features which is a dictionary of
          string feature name to `Tensor` or `SparseTensor`. If it
          returns a tuple, first item is extracted as features.
          Prediction continues until `input_fn` raises an end-of-input
          exception (`OutOfRangeError` or `StopIteration`).
      dtypes:  A nested structure of tf.DType objects corresponding to
          each component of an element yielded by generator.
docstr_tok: ["Constructs","a","Reader","instance","Args",":","read_fn",":","Input","function","returning","features","which","is","a","dictionary","of","string","feature","name","to","`","Tensor","`","or","`","SparseTensor","`",".","If","it","returns","a","tuple",",","first","item","is","extracted","as","features",".","Prediction","continues","until","`","input_fn","`","raises","an","end-of-input","exception","(","`","OutOfRangeError","`","or","`","StopIteration","`",")",".","dtypes",":","A","nested","structure","of","tf.DType","objects","corresponding","to","each","component","of","an","element","yielded","by","generator","."]
code: def __init__(self, read_fn, dtypes):
      """Constructs a Reader instance
  
      Args:
          read_fn: Input function returning features which is a dictionary of
              string feature name to `Tensor` or `SparseTensor`. If it
              returns a tuple, first item is extracted as features.
              Prediction continues until `input_fn` raises an end-of-input
              exception (`OutOfRangeError` or `StopIteration`).
          dtypes:  A nested structure of tf.DType objects corresponding to
              each component of an element yielded by generator.
  
      """
      self.dtypes = dtypes
  
      self.read_fn = read_fn
  
file_path: DLTK/dltk/io/abstract_reader.py
imports: from __future__ import unicode_literals
  from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import tensorflow
  import traceback
label_desc: Use image node_id 1 to create a new Reader object from inherited base classes: object with example: obj = Reader(read_fn, dtypes)