parameters: (self)
return_statement: return opt
docstring: Generate new optimizer.
docstring_summary: Generate new optimizer.
docstring_tokens: Generate new optimizer .
function: def generate_new_optimizer(self):
          """Generate new optimizer."""
          if not self.is_lars:
              opt = self.opt_class(params=self.origin_params, **self.opt_init_args)
          else:
              opt = LARS(self.opt_class(params=self.origin_params, **self.opt_init_args), **self.lars_init_args)
  
          return opt
function_tokens: def generate_new_optimizer ( self ) : if not self . is_lars : opt = self . opt_class ( params = self . origin_params , * * self . opt_init_args ) else : opt = LARS ( self . opt_class ( params = self . origin_params , * * self . opt_init_args ) , * * self . lars_init_args ) return opt