(path, index_path, dont_use_mmap, use_o_direct)
| 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") |
no outgoing calls
no test coverage detected