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

DistributedSampler with different world size #2

Open
nzw0301 opened this issue Mar 13, 2024 · 0 comments
Open

DistributedSampler with different world size #2

nzw0301 opened this issue Mar 13, 2024 · 0 comments

Comments

@nzw0301
Copy link
Owner

nzw0301 commented Mar 13, 2024

In my implementation, I used DistributedSampler(..., drop_last=False) for validation. This is okay when samples % world_size == 0, so my experiments were fine. However, if this value is non-zero by changing the dataset or number of GPUs, please use drop_last=True then replace num_val_samples with math.floor(num_val_samples / world_size) * world_size to avoid evaluating duplicated samples.

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