Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问dataloader能shuffle吗? #113

Closed
XaviLv opened this issue Jun 28, 2023 · 2 comments
Closed

请问dataloader能shuffle吗? #113

XaviLv opened this issue Jun 28, 2023 · 2 comments

Comments

@XaviLv
Copy link

XaviLv commented Jun 28, 2023

我看到 site-packages/sat/data_utils/configure_data.py 的 torch.utils.data.DataLoader() 没有指定 shuffle,也就是用默认值 False。是否意味着每个 epoch 开始时 dataset 不会被打乱顺序?在不改库实现的情况下,有没有其他方式能过做到 shuffle 呢?

@XaviLv
Copy link
Author

XaviLv commented Jun 28, 2023

data_loader = torch.utils.data.DataLoader(dataset, batch_sampler=batch_sampler, num_workers=args.num_workers, pin_memory=True, collate_fn=collate_fn)

@1049451037
Copy link
Member

不用改库,默认是shuffle的,参考make_dataset_full函数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants