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

Wrapping the loss with DistributedDataParallel #710

Open
elisim opened this issue Aug 13, 2024 · 1 comment
Open

Wrapping the loss with DistributedDataParallel #710

elisim opened this issue Aug 13, 2024 · 1 comment

Comments

@elisim
Copy link
Contributor

elisim commented Aug 13, 2024

Hi,

When using DDP, should the loss_fn be wrapped with DistributedDataParallel? I’m specifically working with CosFace and ArcFace, both of which have a W parameter in the loss function. To ensure the gradients of W are synchronized across all processes, is it necessary to wrap loss_fn with DistributedDataParallel?

I saw it here:

#218

@KevinMusgrave
Copy link
Owner

Yeah I think it's necessary.

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

2 participants