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

Load faster #36

Closed
alfredplpl opened this issue Jun 10, 2022 · 1 comment
Closed

Load faster #36

alfredplpl opened this issue Jun 10, 2022 · 1 comment

Comments

@alfredplpl
Copy link

alfredplpl commented Jun 10, 2022

The code seems that the image loading method is slow.
For example, I think the code should load learning images in parallel.
Current:

self.dl = cycle(data.DataLoader(self.ds, batch_size = train_batch_size, shuffle=True, pin_memory=True))

After:
self.dl = cycle(data.DataLoader(self.ds, batch_size = train_batch_size, num_workers=os.cpu_count(), shuffle=True, pin_memory=True))

May I make an pull request?

lucidrains added a commit that referenced this issue Jun 11, 2022
@alfredplpl
Copy link
Author

Thank you for your coding.

kirilzilla pushed a commit to kirilzilla/denoising-diffusion-pytorch-1d that referenced this issue Jul 3, 2023
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

1 participant