-
Notifications
You must be signed in to change notification settings - Fork 116
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
Use dynamic learning rate decay for convergence #39
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: begeekmyfriend <[email protected]>
Hi, your code looks great, and thanks for kindly sending PR! |
melgan_eval_mandarin.zip |
Signed-off-by: begeekmyfriend <[email protected]>
@@ -13,18 +12,35 @@ | |||
from .validation import validate | |||
|
|||
|
|||
def cosine_decay(init_val, final_val, step, decay_steps): | |||
alpha = final_val / init_val |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be init_val / final_val
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The learning rate decays. You might write a demo for testing.
init_val = 1e-4
final_val = 1e-5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the following source it's "Minimum learning rate value as a fraction of learning_rate."
https://docs.w3cub.com/tensorflow~python/tf/train/cosine_decay/
Given the values, it looks like it's correct. The naming is just off - it should be the smallest value in the numerator and largest value in the denominator.
Is this different from pytorch's built-in CosineAnnealingLR? |
@begeekmyfriend |
It is just a preference. Pick it or other as you like. |
@begeekmyfriend Thank you for your quick reply. I used your branch of tacotron and found it is one of the best among a lot of code branchs. I will try the cos-lr as well as the apex in tfgan. |
The evaluation sounds better than that with fixed learning rate.
Signed-off-by: begeekmyfriend [email protected]