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

Add async sgd document #8474

Merged
merged 5 commits into from
Feb 28, 2018
Merged

Conversation

Yancey1989
Copy link
Contributor

Fixed #8268

@@ -365,7 +365,8 @@ def settings(batch_size,
regularization=None,
is_async=False,
model_average=None,
gradient_clipping_threshold=None):
gradient_clipping_threshold=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems these changes broke the CI unit tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


## 异步 SGD 更新

您可以修改 `optimize` 的参数来支持异步SGD更新,示例如下:
Copy link
Collaborator

Choose a reason for hiding this comment

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

下文里没有一个叫做 optimize 的参数呀?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done as comment #8474 (comment).


## Async SGD Update

You can modify the parameters of `optimize` to support Async SGD update, for example:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see a parameter named optimize in the following code snippet. Do you mean

We can set some parameters of the optimizer to make it support async SGD update. For example, we can set the is_async and async_lagged_grad_discard_ratio of the AdaGrad optimizer:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this description is clearer.

@@ -396,6 +397,10 @@ def settings(batch_size,
value larger than some value, will be
clipped.
:type gradient_clipping_threshold: float
:param async_lagged_grad_discard_ratio: async sgd gradient commit control,
Copy link
Collaborator

Choose a reason for hiding this comment

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

sgd => SGD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -396,6 +397,10 @@ def settings(batch_size,
value larger than some value, will be
clipped.
:type gradient_clipping_threshold: float
:param async_lagged_grad_discard_ratio: async sgd gradient commit control,
when async_lagged_grad_discard_ratio * num_gradient_servers commit passed,
current async gradient will be discard silently.
Copy link
Collaborator

Choose a reason for hiding this comment

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

will be discard silently

==>

is discarded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -396,6 +397,10 @@ def settings(batch_size,
value larger than some value, will be
clipped.
:type gradient_clipping_threshold: float
:param async_lagged_grad_discard_ratio: async sgd gradient commit control,
when async_lagged_grad_discard_ratio * num_gradient_servers commit passed,
current async gradient will be discard silently.
Copy link
Collaborator

Choose a reason for hiding this comment

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

current sgd gradient

==>

the current SGD gradient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM++

@Yancey1989 Yancey1989 merged commit fee90b5 into PaddlePaddle:develop Feb 28, 2018
@Yancey1989 Yancey1989 deleted the async_sgd_doc branch February 28, 2018 11:58
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.

None yet

3 participants