You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is an extra call to compute_r() in the line_search() function on line 137 of admm.py. It seems like build_linear_system() returns a value for r on line 128, and then compute_r() is called again on line 137 using the same unchanged arguments.
This is the call on line 128:
M, r = build_linear_system(gamma, u, C, e, rho, s, t)
This is what build_linear_system() calls:
def build_linear_system(gamma, u, C, e, rho, s, t):
"""Build the linear system for ADMM.primal_dual (see appendix section 5.2.7)."""
n, k = e.shape
H = hessian_f0(gamma, e, rho, s)
uC = scipy.sparse.diags(np.squeeze(u), 0).dot(C)
Cg = scipy.sparse.diags(np.squeeze(C.dot(gamma)))
M = scipy.sparse.vstack((scipy.sparse.hstack((H, C.T)),
scipy.sparse.hstack((-uC, -Cg)))).tocsr()
r = compute_r(gamma, u, C, e, rho, s, t)
return M, r
And then compute_r() called again with the same variables on line 137:
r = compute_r(gamma, u, C, e, rho, s, t)
I'm not sure if this was intentional, nor do I know how computationally taxing it is either since I haven't had a chance to explicitly profile compute_r(). But if it's a redundant call, then it is potentially being called up to 1,500 times more than it should per topic (15 iterations of update_xis inside admm() and then up to 100 iterations of line_search() inside primal_dual()).
The text was updated successfully, but these errors were encountered:
I think there is an extra call to
compute_r()
in theline_search()
function on line 137 ofadmm.py
. It seems likebuild_linear_system()
returns a value forr
on line 128, and thencompute_r()
is called again on line 137 using the same unchanged arguments.This is the call on line 128:
This is what
build_linear_system()
calls:And then
compute_r()
called again with the same variables on line 137:I'm not sure if this was intentional, nor do I know how computationally taxing it is either since I haven't had a chance to explicitly profile
compute_r()
. But if it's a redundant call, then it is potentially being called up to 1,500 times more than it should per topic (15 iterations ofupdate_xis
insideadmm()
and then up to 100 iterations ofline_search()
insideprimal_dual()
).The text was updated successfully, but these errors were encountered: