-
Notifications
You must be signed in to change notification settings - Fork 617
Port ProximalAdagrad #1976
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
Port ProximalAdagrad #1976
Conversation
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.
Looks greate, leave a minor comment :-)
super().__init__(name, **kwargs) | ||
self._set_hyper("learning_rate", kwargs.get("lr", learning_rate)) | ||
self.l1_regularization_strength = l1_regularization_strength | ||
self.l2_regularization_strength = l2_regularization_strength |
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.
How about creating l1_regularxx and l2_regularxx as hyper-parameter?
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.
Will do. Just copy paste the name from compat.v1
. Maybe l1
and l2
are more suitable?
https://www.tensorflow.org/api_docs/python/tf/keras/regularizers/L1L2
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 agree, l1
and l2
are more concise :-)
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.
Tzu-Wei, perhaps we could use self._set_hyper
for l1
and l2
, what do you think?
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.
of course. let me update it real quick :-)
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.
Seems that _set_hyper
/_get_hyper
supports more types of inputs.
Umm, sorry for the confusion, but |
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.
Looks good, Tzu-Wei. Let's merge it after all tests pass :-)
* Port ProximalAdagrad optimizer * Update code owner * Address comments * Fix tests * run formatter * Reorder import * Use set_hyper/get_hyper * Change back to *_regularization_stength
* Port ProximalAdagrad optimizer * Update code owner * Address comments * Fix tests * run formatter * Reorder import * Use set_hyper/get_hyper * Change back to *_regularization_stength
Closes #591.