In minimize.least_squares, compute values at the solution at full verbosity.
PiperOrigin-RevId: 745301888 Change-Id: Ibd8e35e405bb2cebc7ac59a6dfc77118a6e6ba9f
This commit is contained in:
committed by
Copybara-Service
parent
699ad13a72
commit
5031f88158
@@ -127,8 +127,8 @@ class MinimizeTest(absltest.TestCase):
|
||||
output=out,
|
||||
verbose=minimize.Verbosity.FULLITER,
|
||||
)
|
||||
self.assertIn(' < tol', out.getvalue())
|
||||
grad = trace[-2].jacobian.T @ trace[-2].residual
|
||||
self.assertIn('norm(gradient) < tol', out.getvalue())
|
||||
grad = trace[-1].grad
|
||||
# If x_i is on the boundary, gradient points out, otherwise it is 0.
|
||||
for i, xi in enumerate(x):
|
||||
if xi == bounds[0][i]:
|
||||
|
||||
Reference in New Issue
Block a user