From 4788971d54a341a26bb66971d6bc7f7c1d75656f Mon Sep 17 00:00:00 2001 From: xiaoguoguo626807 <100397923+xiaoguoguo626807@users.noreply.github.com> Date: Tue, 15 Aug 2023 09:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90lbfgs=E3=80=91add=20reference=20of=20l?= =?UTF-8?q?bfgs=20(#56194)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add reference of lbfgs * add reference of lbfgs --- python/paddle/optimizer/lbfgs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/optimizer/lbfgs.py b/python/paddle/optimizer/lbfgs.py index d309e67772b..7afd59e65ad 100644 --- a/python/paddle/optimizer/lbfgs.py +++ b/python/paddle/optimizer/lbfgs.py @@ -143,6 +143,8 @@ def _strong_wolfe( a_lo = aj; end(repeat) + + reference: https://github.com/pytorch/pytorch """ d_norm = d.abs().max() @@ -275,7 +277,6 @@ def _strong_wolfe( # Armijo condition not satisfied or not lower than lowest point bracket[high_pos] = alpha bracket_f[high_pos] = loss_new - # bracket_g[high_pos] = grad_new.clone(memory_format=torch.contiguous_format) bracket_g[high_pos] = grad_new.clone() bracket_gtd[high_pos] = gtd_new low_pos, high_pos = ( -- GitLab