예제 #1
0
    def __init__(self,
                 step: float = None,
                 tol: float = 0.,
                 max_iter: int = 100,
                 verbose: bool = True,
                 print_every: int = 10,
                 record_every: int = 1,
                 linesearch_step_increase: float = 2.,
                 linesearch_step_decrease: float = 0.5,
                 modified=False):
        SolverFirstOrder.__init__(self,
                                  step=step,
                                  tol=tol,
                                  max_iter=max_iter,
                                  verbose=verbose,
                                  print_every=print_every,
                                  record_every=record_every)

        self.linesearch_step_increase = linesearch_step_increase
        self.linesearch_step_decrease = linesearch_step_decrease

        self.modified = modified
        self.model_ssc = None
        self.prox_ssc = self._ProxStandardSC()
        self._th_gain = 0
예제 #2
0
    def __init__(self,
                 step: float = None,
                 epoch_size: int = None,
                 rand_type="unif",
                 tol=0.,
                 max_iter=100,
                 verbose=True,
                 print_every=10,
                 record_every=1,
                 seed=-1):

        self._step = None

        # We must first construct SolverSto (otherwise self.step won't
        # work in SolverFirstOrder)
        SolverSto.__init__(self,
                           epoch_size=epoch_size,
                           rand_type=rand_type,
                           seed=seed)
        SolverFirstOrder.__init__(self,
                                  step=step,
                                  tol=tol,
                                  max_iter=max_iter,
                                  verbose=verbose,
                                  print_every=print_every,
                                  record_every=record_every)
예제 #3
0
 def __init__(self, step: float = None, tol: float = 0.,
              max_iter: int = 100, linesearch: bool = True,
              linesearch_step_increase: float = 2.,
              linesearch_step_decrease: float = 0.5,
              verbose: bool = True, print_every: int = 10,
              record_every: int = 1):
     SolverFirstOrder.__init__(self, step=step, tol=tol, max_iter=max_iter,
                               verbose=verbose, print_every=print_every,
                               record_every=record_every)
     self.linesearch = linesearch
     self.linesearch_step_increase = linesearch_step_increase
     self.linesearch_step_decrease = linesearch_step_decrease
예제 #4
0
 def __init__(self,
              tol: float = 1e-10,
              max_iter: int = 10,
              verbose: bool = True,
              print_every: int = 1,
              record_every: int = 1):
     SolverFirstOrder.__init__(self,
                               step=None,
                               tol=tol,
                               max_iter=max_iter,
                               verbose=verbose,
                               print_every=print_every,
                               record_every=record_every)
     self._prox_grad = None
예제 #5
0
파일: gfb.py 프로젝트: cderemble/tick
 def __init__(self,
              step: float = None,
              tol: float = 0.,
              max_iter: int = 1000,
              surrelax=1.,
              verbose: bool = True,
              print_every: int = 10,
              record_every: int = 1):
     SolverFirstOrder.__init__(self,
                               step=step,
                               tol=tol,
                               max_iter=max_iter,
                               verbose=verbose,
                               print_every=print_every,
                               record_every=record_every)
     self.surrelax = surrelax