MCPcopy Create free account
hub / github.com/NVIDIA/DALI / tfrecord_pipe

Function tfrecord_pipe

dali/test/python/reader/test_index.py:80–89  ·  view source on GitHub ↗
(path, index_path, dont_use_mmap, use_o_direct)

Source from the content-addressed store, hash-verified

78
79 @pipeline_def(batch_size=batch_size, device_id=0, num_threads=4)
80 def tfrecord_pipe(path, index_path, dont_use_mmap, use_o_direct):
81 input = fn.readers.tfrecord(
82 path=path,
83 index_path=index_path,
84 dont_use_mmap=dont_use_mmap,
85 use_o_direct=use_o_direct,
86 features={"image/class/label": tfrec.FixedLenFeature([1], tfrec.int64, -1)},
87 name="Reader",
88 )
89 return input["image/class/label"]
90
91 tfrecord = os.path.join(get_dali_extra_path(), "db", "tfrecord", "train")
92 tfrecord_idx = os.path.join(get_dali_extra_path(), "db", "tfrecord", "train.idx")

Callers 4

test_tfrecord_odirectFunction · 0.85
test_wrong_feature_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected