TFRecordReader¶
- class dragon.vm.dali.ops.TFRecordReader(
 path,
 shard_id=0,
 num_shards=1,
 random_shuffle=False,
 initial_fill=1024,
 **kwargs
 )[source]¶
- Read examples from the TFRecord. - Examples: - # Assume that we have the following files: # /path/to/records/00000.data # /path/to/records/00000.index # /path/to/records/METADATA input = dali.ops.TFRecordReader( path='/path/to/records', # Shuffle locally in the next ``initial_fill`` examples # It turns to be weak with the decreasing of ``initial_fill`` # and disabled if ``initial_fill`` is set to **1** random_shuffle=True, initial_fill=1024) 
__new__¶
- static TFRecordReader.__new__(
 cls,
 path,
 shard_id=0,
 num_shards=1,
 random_shuffle=False,
 initial_fill=1024,
 **kwargs
 )[source]¶
- Create a - TFRecordReader.- Parameters:
- path (str) – The folder of record files.
- shard_id (int, optional, default=0) – The index of partition to read.
- num_shards (int, optional, default=1) – The total number of partitions over dataset.
- random_shuffle (bool, optional, default=False) – Whether to shuffle the data.
- initial_fill (int, optional, default=1024) – The length of sampling sequence for shuffle.
 
 - Returns:
- nvidia.dali.ops.readers.TFRecord – The reader instance. 
 
