-
Notifications
You must be signed in to change notification settings - Fork 5.9k
"lr state serialization" #2718
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
"lr state serialization" #2718
Changes from all commits
6935dd7
e1acd73
7edabe7
dec65ac
45adbfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,11 +78,15 @@ enum DataType { | |
| repeated bytes content = 2; | ||
| } | ||
|
|
||
| message LrPolicyState { | ||
| // learninRate Policy | ||
| optional double learning_rate = 1 [default = 1.0]; | ||
| optional double lr_decay_a = 2; | ||
| optional double lr_decay_b = 3; | ||
| } | ||
|
|
||
| message SGDOptimizerState { | ||
| // learning rate policy | ||
| optional double learning_rate = 101; | ||
| optional double lr_decay_a = 102; | ||
| optional double lr_decay_b = 103; | ||
| optional LrPolicyState lr_state = 101; | ||
| optional double num_sample_passed = 104; | ||
| // state | ||
| optional TensorProto parameter = 1; | ||
|
|
@@ -91,9 +95,7 @@ message SGDOptimizerState { | |
|
|
||
| message AdadeltaOptimizerState { | ||
| // learning rate policy | ||
| optional double learning_rate = 101; | ||
| optional double lr_decay_a = 102; | ||
| optional double lr_decay_b = 103; | ||
| optional LrPolicyState lr_state = 101; | ||
| optional double num_sample_passed = 104; | ||
| // state | ||
| optional TensorProto parameter = 1; | ||
|
|
@@ -102,22 +104,17 @@ message AdadeltaOptimizerState { | |
| optional TensorProto update_delta = 4; | ||
| } | ||
|
|
||
|
|
||
| message AdagradOptimizerState { | ||
| // learning rate policy | ||
| optional double learning_rate = 101; | ||
| optional double lr_decay_a = 102; | ||
| optional double lr_decay_b = 103; | ||
| optional LrPolicyState lr_state = 101; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not re-use protobuf ids to change the fields. Well, since we it's still under development, this is fine. When people are using this code, we need to consider the backward compatibility. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the reminding. That's true when we maintain a project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once the protobuf index is used by messages, it should never change for compatibility, for the old client or somewhere is still using the old
|
||
| optional double num_sample_passed = 104; | ||
| // state | ||
| optional TensorProto parameter = 1; | ||
| optional TensorProto accum_gradient = 2; | ||
| } | ||
|
|
||
| message AdamOptimizerState { | ||
| // learning rate policy | ||
| optional double learning_rate = 101; | ||
| optional double lr_decay_a = 102; | ||
| optional double lr_decay_b = 103; | ||
| optional LrPolicyState lr_state = 101; | ||
| optional double num_sample_passed = 104; | ||
| // state | ||
| optional TensorProto parameter = 1; | ||
|
|
||
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.
Not sure why need to
+=?Uh oh!
There was an error while loading. Please reload this page.
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.
because get the lr_state serialization length here.
use
=will overwrite the lr_state length.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.
I see.