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

Fix mask issue in distributed nt_xent loss #46

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

lxysl
Copy link
Contributor

@lxysl lxysl commented Sep 2, 2023

Fix the mask issue #30 in nt_xent loss when training in a distributed situation. The all_gather result of z used to build mask should be something like [z_i1, z_i2, ..., z_iw, z_j1, z_j2, ..., z_jw] instead of [z_i1, z_j1,z_i2, z_j2, ..., z_iw, z_jw], where w represents the world_size.

@Spijkervet Spijkervet merged commit 2738efa into Spijkervet:master Nov 10, 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

Successfully merging this pull request may close these issues.

2 participants