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
评论列表
文章目录