class_docstr: Penalized Limited-memory BFGS (L-BFGS) optimizer.
  
  Performs constrained optimization via penalized L-BFGS. The penalty term is
  adaptively adjusted to make sure that the constraint is satisfied.
  
  Args:
      max_opt_itr (int): Maximum iteration for update.
      initial_penalty (float): Initial penalty.
      min_penalty (float): Minimum penalty allowed. Penalty will be clipped
          if lower than this value.
      max_penalty (float): Maximum penalty allowed. Penalty will be clipped
          if higher than this value.
      increase_penalty_factor (float): Factor to increase penalty in each
          penalty iteration.
      decrease_penalty_factor (float): Factor to decrease penalty in each
          penalty iteration.
      max_penalty_itr (int): Maximum penalty iterations to perform.
      adapt_penalty (bool): Whether the penalty is adaptive or not. If false,
          penalty will not change.
class_docstr_tok: ["Penalized","Limited-memory","BFGS","(","L-BFGS",")","optimizer",".","Performs","constrained","optimization","via","penalized","L-BFGS",".","The","penalty","term","is","adaptively","adjusted","to","make","sure","that","the","constraint","is","satisfied",".","Args",":","max_opt_itr","(","int",")",":","Maximum","iteration","for","update",".","initial_penalty","(","float",")",":","Initial","penalty",".","min_penalty","(","float",")",":","Minimum","penalty","allowed",".","Penalty","will","be","clipped","if","lower","than","this","value",".","max_penalty","(","float",")",":","Maximum","penalty","allowed",".","Penalty","will","be","clipped","if","higher","than","this","value",".","increase_penalty_factor","(","float",")",":","Factor","to","increase","penalty","in","each","penalty","iteration",".","decrease_penalty_factor","(","float",")",":","Factor","to","decrease","penalty","in","each","penalty","iteration",".","max_penalty_itr","(","int",")",":","Maximum","penalty","iterations","to","perform",".","adapt_penalty","(","bool",")",":","Whether","the","penalty","is","adaptive","or","not",".","If","false",",","penalty","will","not","change","."]
code: def __init__(
      self,
      max_opt_itr=20,
      initial_penalty=1.0,
      min_penalty=1e-2,
      max_penalty=1e6,
      increase_penalty_factor=2,
      decrease_penalty_factor=0.5,
      max_penalty_itr=10,
      adapt_penalty=True,
  ):
      self._max_opt_itr = max_opt_itr
      self._penalty = initial_penalty
      self._initial_penalty = initial_penalty
      self._min_penalty = min_penalty
      self._max_penalty = max_penalty
      self._increase_penalty_factor = increase_penalty_factor
      self._decrease_penalty_factor = decrease_penalty_factor
      self._max_penalty_itr = max_penalty_itr
      self._adapt_penalty = adapt_penalty
  
      self._opt_fun = None
      self._target = None
      self._max_constraint_val = None
      self._constraint_name = None
  
file_path: garage/src/garage/tf/optimizers/penalty_lbfgs_optimizer.py
imports: from dowel import logger
  import numpy
  import scipy.optimize
  import tensorflow
  from garage.tf import compile_function, flatten_tensor_variables
  from garage.tf.optimizers._dtypes import LazyDict
label_desc: Use image node_id 1 to create a new PenaltyLBFGSOptimizer object  with example: obj = PenaltyLBFGSOptimizer(max_opt_itr, initial_penalty, min_penalty, max_penalty, increase_penalty_factor, decrease_penalty_factor, max_penalty_itr, adapt_penalty)