def initialize_values(self, x0, step): step, obj, x, x_old = \ SolverFirstOrder._initialize_values(self, x0, step, n_empty_vectors=1) z_list = [np.zeros_like(x) for _ in range(self.prox.n_proxs)] z_old_list = [np.zeros_like(x) for _ in range(self.prox.n_proxs)] return x, x_old, z_list, z_old_list, obj, step
def _initialize_values(self, x0, step): step, obj, x, prev_x, prev_grad_x_ssc, grad_x_ssc = \ SolverFirstOrder._initialize_values(self, x0, step, n_empty_vectors=3) grad_x_ssc = self.model_ssc.grad(x, out=grad_x_ssc) return step, obj, x, prev_x, prev_grad_x_ssc, grad_x_ssc
def _initialize_values(self, x0=None, step=None): if step is None: if self.step is None: if self.linesearch: # If we use linesearch, then we can choose a large # initial step step = 1e9 else: raise ValueError("No step specified.") step, obj, x, prev_x, x_new = \ SolverFirstOrder._initialize_values(self, x0, step, n_empty_vectors=2) return x, prev_x, x_new, step, obj