Skip to content
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

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

lijialin03
Copy link
Contributor

@lijialin03 lijialin03 commented Mar 21, 2023

PR types

Others

PR changes

APIs

Description

Pcard-66961
add paddle.optimizer.LBFGS API
modify numel in _add_grad function to shorten time

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2023

CLA assistant check
All committers have signed the CLA.

@lijialin03 lijialin03 force-pushed the develop branch 4 times, most recently from 204e708 to 1bcaa95 Compare March 23, 2023 02:51
@lijialin03 lijialin03 changed the title modify numel in _add_grad function test=develop modify numel in _add_grad function and a new test case test=develop Mar 23, 2023
else:
numel = 1
for dim in p.shape:
numel *= dim
Copy link
Contributor

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)


Copy link
Contributor

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

@cxxly
Copy link
Contributor

cxxly commented Apr 7, 2023

add @framework.non_static_only for step

@cxxly
Copy link
Contributor

cxxly commented Apr 7, 2023

copy same version into python/paddle/optimizer/ and add LFBGS into all of init.py

@lijialin03 lijialin03 force-pushed the develop branch 8 times, most recently from 67190c9 to 29c8145 Compare April 7, 2023 12:52
@cxxly
Copy link
Contributor

cxxly commented Apr 10, 2023

add deprecated for LBFGS in incubate

@lijialin03 lijialin03 force-pushed the develop branch 3 times, most recently from 990738b to 7788333 Compare April 10, 2023 12:32
@lijialin03 lijialin03 changed the title modify numel in _add_grad function and a new test case test=develop add paddle.optimizer.LBFGS API and a modify its test case test=develop Apr 12, 2023
@lijialin03 lijialin03 force-pushed the develop branch 3 times, most recently from 8bc4260 to f6111ca Compare April 19, 2023 13:00
@cxxly
Copy link
Contributor

cxxly commented Apr 24, 2023

move all test cast into one file ttest_lbfgs_class.py


import paddle
from paddle.optimizer import LBFGS
from paddle.optimizer.lbfgs import _cubic_interpolate, _strong_wolfe
Copy link
Contributor

@cxxly cxxly Apr 24, 2023

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

XiaoguangHu01
XiaoguangHu01 previously approved these changes Apr 24, 2023
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cxxly
cxxly previously approved these changes Apr 24, 2023
Copy link
Contributor

@cxxly cxxly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

XieYunshen
XieYunshen previously approved these changes Apr 25, 2023
Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
单测重命名

@lijialin03 lijialin03 changed the title add paddle.optimizer.LBFGS API and a modify its test case test=develop [cherry-pick] add paddle.optimizer.LBFGS API and a modify its test case test=develop Apr 25, 2023
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lijialin03 lijialin03 changed the title [cherry-pick] add paddle.optimizer.LBFGS API and a modify its test case test=develop add paddle.optimizer.LBFGS API and a modify its test case test=develop Apr 26, 2023
Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cxxly cxxly merged commit 8386417 into PaddlePaddle:develop Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants