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

Step size for parameter updater #3459

Closed
wants to merge 1 commit into from

Conversation

Yancey1989
Copy link
Contributor

Fixed #3369

Copy link
Contributor

@helinwang helinwang left a comment

Choose a reason for hiding this comment

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

The step size for upload / download is fixed as the same value. We will ultimately need to configure different step size for upload and download. But I think this is fine for this PR.
Could you create a new card in https://github.com/PaddlePaddle/Paddle/projects/18 to track this feature request?

@@ -167,7 +173,8 @@ def train(self, reader, num_passes=1, event_handler=None, feeding=None):
batch_id=batch_id,
cost=cost,
evaluator=batch_evaluator))
self.__parameter_updater__.finishBatch(cost)
if batch_id >= step_size and batch_id % step_size == 0:
self.__parameter_updater__.finishBatch(cost)
Copy link
Contributor

@helinwang helinwang Aug 14, 2017

Choose a reason for hiding this comment

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

This is assuming the gradient is not reset to 0 and always accumulating new gradients across different steps, unless para->getBuf(PARAMETER_GRADIENT)->zeroMem(); is called.
I have checked the implementation inside NeuralNetwork.cpp, which does not reset the gradient across different steps, but each layer have access to the parameters and could potentially reset the gradient.
Just double check, did you verify with @jacquesqiao or @hedaoyuan about the correctness of this implementation?

@luotao1
Copy link
Contributor

luotao1 commented Feb 1, 2019

感谢您给PaddlePaddle贡献代码。由于Paddle V1/V2版本已不再维护,相关代码也已从develop分支上删除,因此关闭您的PR,欢迎您向Paddle最新版-Fluid贡献代码。
Thanks for contributing to PaddlePaddle! Since V1/V2 will not be maintained anymore, and related codes have been deleted from develop branch as well, we close this PR. Welcome to contribute to Fluid——the latest version of PaddlePaddle.

@luotao1 luotao1 closed this Feb 1, 2019
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