carpet/loss_gradient.py
def analysis_dual_grad(v, A, D, x, Psi_A=None):
    """ Gradient for the dual formulation of the analysis problem. """
    v = np.atleast_2d(v)
    Psi_A = np.linalg.pinv(A).dot(D) if Psi_A is None else Psi_A
    return (v.dot(Psi_A.T) - x).dot(Psi_A)
 Gradient for the dual formulation of the analysis problem. 
Gradient for the dual formulation of the analysis problem.
Gradient for the dual formulation of the analysis problem .
def analysis_dual_grad(v, A, D, x, Psi_A=None):
    v = np.atleast_2d(v)
    Psi_A = np.linalg.pinv(A).dot(D) if Psi_A is None else Psi_A
    return (v.dot(Psi_A.T) - x).dot(Psi_A)
def analysis_dual_grad ( v , A , D , x , Psi_A = None ) : v = np . atleast_2d ( v ) Psi_A = np . linalg . pinv ( A ) . dot ( D ) if Psi_A is None else Psi_A return ( v . dot ( Psi_A . T ) - x ) . dot ( Psi_A )
Gradient for the dual formulation of the analysis problem.
Gradient for the dual formulation of the analysis problem .
""" Gradient for the dual formulation of the analysis problem. """
v
A
D
x
Psi_A