class_docstr: Wright, S., & Nocedal, J. (1999). Numerical optimization. Springer Science,
  35(67-68), 7. Chapter 19
class_docstr_tok: ["Wright",",","S.",",","&","Nocedal",",","J",".","(","1999",")",".","Numerical","optimization",".","Springer","Science",",","35","(","67-68",")",",","7",".","Chapter","19"]
docstr: discount is a positive weight that is decreasing, and here it is implemented
  similar to the learning rate. It is specified by a learning rate policy and
  corresponding options
docstr_tok: ["discount","is","a","positive","weight","that","is","decreasing",",","and","here","it","is","implemented","similar","to","the","learning","rate",".","It","is","specified","by","a","learning","rate","policy","and","corresponding","options"]
code: def __init__(
      self, reg_lambda, discount_policy="inv", discount_options=None
  ):
      """
      discount is a positive weight that is decreasing, and here it is implemented
      similar to the learning rate. It is specified by a learning rate policy and
      corresponding options
      """
      super().__init__()
      assert (
          reg_lambda > 0
      ), "factor ahead of regularization should be 0 or positive"
      self.reg_lambda = reg_lambda
      self.discount_policy = discount_policy
      self.discount_options = discount_options or {
          "gamma": 1.0,
          "power": 1.0,
      }
  
imports: from caffe2.python import core, utils
  import numpy
label_desc: Use image node_id 1 to create a new LogBarrier object from inherited base classes: Regularizer with example: obj = LogBarrier(reg_lambda, discount_policy, discount_options)