diff --git a/python/paddle/optimizer/lbfgs.py b/python/paddle/optimizer/lbfgs.py index d309e67772b4cab7763e5123123c70ea430c1104..7afd59e65ade1873859be01401756a46331ea1de 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 = (