Question about TFRecord data shuffle in DALI.
@szalpal is already working on this.
Since Aug 16, 2023.
- Dominant language
- C++
- Stars
- 5.8k
- Forks
- 678
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 27
Description
Question about TFRecord data shuffle in DALI
Hello~, I have some question about TFRecord data's random_shuffle in DALI.
For example, I have a dataset contains 8k images, when I make it a TFRecord data, it is spilt into 8 files like dataset.tfrecord-00000-of-00008, dataset.tfrecord-00001-of-00008... dataset.tfrecord-00007-of-00008, each of them contains 1k images.
When I use fn.readers.tfrecord(random_shuffle=True), how does it realize shuffle?
Situation 1: The 8 files random_shuffle in its own part, which can be thought as 8 separately random_shuffle, in each they random shuffle its own 1k images.
Situation 2: The 8 files random_shuffle together. They random shuffle 8k images together.
The reason I ask this question is because when I am using DALI do my training. Traing with DALI processing the data get a lower metric than trainging whithout DALI. But if I put random_shuffle=False and make they load data as the same order, the metric of them are nearly same. So I wondered if DALI TFRecord's random_shuffle maybe the reason causing the lower metric?
Thanks for your reading, it will help me a lot.
Check for duplicates
- I have searched the open bugs/issues and have found no duplicates for this bug report
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.