-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
add paddle.optimizer.LBFGS API and a modify its test case test=develop #51912
Conversation
204e708
to
1bcaa95
Compare
else: | ||
numel = 1 | ||
for dim in p.shape: | ||
numel *= dim |
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.
functools.reduce(lambda x, y: x*y, x.shape)
) | ||
|
||
self.assertRaises(AssertionError, error_func3) | ||
|
||
|
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.
move all test case into test_lbfgs.py
add @framework.non_static_only for step |
copy same version into python/paddle/optimizer/ and add LFBGS into all of init.py |
67190c9
to
29c8145
Compare
add deprecated for LBFGS in incubate |
990738b
to
7788333
Compare
8bc4260
to
f6111ca
Compare
move all test cast into one file t |
|
||
import paddle | ||
from paddle.optimizer import LBFGS | ||
from paddle.optimizer.lbfgs import _cubic_interpolate, _strong_wolfe |
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.
import follow pep2 code style, import moudle rather than class/function
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
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
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
单测重命名
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
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
PR types
Others
PR changes
APIs
Description
Pcard-66961
add paddle.optimizer.LBFGS API
modify numel in _add_grad function to shorten time