-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Fix v2 optimizer define order #4972
Fix v2 optimizer define order #4972
Conversation
python/paddle/v2/topology.py
Outdated
parameter.initial_smart = cp.g_default_initial_smart | ||
if parameter.num_batches_regularization == 1 and cp.g_default_num_batches_regularization: | ||
parameter.num_batches_regularization = cp.g_default_num_batches_regularization | ||
if parameter.gradient_clipping_threshold == 0.0 and cp.g_default_gradient_clipping_threshold: |
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.
line excess 80.
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.
Done.
python/paddle/v2/topology.py
Outdated
# are defined after layers, or between layers. | ||
# Must be called from trainer.__init__() | ||
for parameter in self.__model_config__.parameters: | ||
print "####", parameter.decay_rate, cp.g_default_decay_rate |
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.
Is this print necessary? It seems that this is for debug print?
paddle/math/RowBuffer.h
Outdated
CHECK_LE((row + 1) * width_ * sizeof(real), preallocatedBuf_->getSize()); | ||
// CHECK_LE((row + 1) * width_ * sizeof(real), | ||
// preallocatedBuf_->getSize()); | ||
CHECK_LE((row)*width_ * sizeof(real), preallocatedBuf_->getSize()); |
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 am not sure what are these lines for? are these lines accidentally added?
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.
Sorry, that's for my local testing, will revert this file.
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.
LGTM, thank you very much.
Fix #2621
Fix #2563