未验证 提交 4788971d 编写于 作者: X xiaoguoguo626807 提交者: GitHub

【lbfgs】add reference of lbfgs (#56194)

* add reference of lbfgs

* add reference of lbfgs
上级 7901abe8
...@@ -143,6 +143,8 @@ def _strong_wolfe( ...@@ -143,6 +143,8 @@ def _strong_wolfe(
a_lo = aj; a_lo = aj;
end(repeat) end(repeat)
reference: https://github.com/pytorch/pytorch
""" """
d_norm = d.abs().max() d_norm = d.abs().max()
...@@ -275,7 +277,6 @@ def _strong_wolfe( ...@@ -275,7 +277,6 @@ def _strong_wolfe(
# Armijo condition not satisfied or not lower than lowest point # Armijo condition not satisfied or not lower than lowest point
bracket[high_pos] = alpha bracket[high_pos] = alpha
bracket_f[high_pos] = loss_new 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_g[high_pos] = grad_new.clone()
bracket_gtd[high_pos] = gtd_new bracket_gtd[high_pos] = gtd_new
low_pos, high_pos = ( low_pos, high_pos = (
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册