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

[doc] use ddp to calculate loss of dev set #23

Merged
merged 1 commit into from
Dec 18, 2020
Merged

[doc] use ddp to calculate loss of dev set #23

merged 1 commit into from
Dec 18, 2020

Conversation

whiteshirt0429
Copy link
Collaborator

No description provided.

@whiteshirt0429 whiteshirt0429 changed the title use ddp to calculate loss of dev set [doc] use ddp to calculate loss of dev set Dec 17, 2020
Copy link
Collaborator

@robin1001 robin1001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see inline


num_seen_utts = torch.Tensor([num_seen_utts]).to(loss.get_device())
# the default operator in all_reduce function is sum.
average_params(num_seen_utts)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directly calling torch.distributed.all_reduce here is better.
There is no need to wrap it into a new function. And the function name avarage_params is ambiguous.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And do this calling affect no DDP training?

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.

4 participants