TFrecords reader class
tefla.dataset.reader.Reader (dataset, reader_kwargs=None, shuffle=True, num_readers=16, capacity=1, num_epochs=None)
Args
- dataset: an instance of the dataset class
- reader_kwargs: extra arguments to be passed to the TFRecordReader
- shuffle: whether to shuffle the dataset
- num_readers:a int, num of readers to launch
- capacity: a int, capacity of the queue used
- num_epochs: a int, num of epochs for training or validation
Methods
parallel_reader (min_queue_examples=1024)
Primarily used for Training ops
Args
- min_queue_examples: min number of queue examples after dequeue
single_reader (num_epochs=1, shuffle=False, capacity=1)
Data will be read using single TFRecordReader, primarily used for validation
Args
- num_epochs: number of epoch
- shuffle: shuffle the dataset. False for validation
- capacity: queue capacity
Returns
a single item from the tfrecord files