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

create learning rate variable for every parameter #5524

Merged
merged 3 commits into from
Nov 13, 2017

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Nov 9, 2017

Fix #5525

shape=param_lr_shape,
lod_level=1,
persistable=True)
param_lr = param_lr * self._learning_rate
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure that this will be multiplied? Is there a reference for this implementation or is it taken from the old Paddle code?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lcy-seso @reyoung Could you please confirm this? Is each parameter's learning rate set relatively, and calculated by multiplying global learning rate?

Copy link
Contributor

@lcy-seso lcy-seso Nov 13, 2017

Choose a reason for hiding this comment

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

This is the way old PaddlePaddle uses. The learning rate of one parameter is determined by multiplying the global learning rate to the layerwise set learning rate (if set).

Copy link
Contributor

Choose a reason for hiding this comment

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

@lcy-seso Do you know how this works together with learning rate scheduler? Does the learning rate scheduler only work for the global learning rate?

Copy link
Contributor

@lcy-seso lcy-seso Nov 13, 2017

Choose a reason for hiding this comment

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

From the codes, it seems that the learning rate schedule only works for global learning rate:

In old PaddlePaddle it seems that the learning rate scheduler just calculates a scale factor to decrease the learning rate.

Copy link
Contributor

@abhinavarora abhinavarora left a comment

Choose a reason for hiding this comment

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

LGTM!

@QiJune QiJune merged commit 9c25218 into PaddlePaddle:develop Nov 13, 2017
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.

3 participants