class_docstr: Piecewise learning rate decay
  Args:
      lr(float): initial learning rate
      step_each_epoch(int): steps each epoch
      decay_epochs(list): piecewise decay epochs
      gamma(float): decay factor
class_docstr_tok: ["Piecewise","learning","rate","decay","Args",":","lr","(","float",")",":","initial","learning","rate","step_each_epoch","(","int",")",":","steps","each","epoch","decay_epochs","(","list",")",":","piecewise","decay","epochs","gamma","(","float",")",":","decay","factor"]
code: def __init__(
      self, lr, step_each_epoch, decay_epochs, gamma=0.1, **kwargs
  ):
      boundaries = [step_each_epoch * e for e in decay_epochs]
      lr_values = [
          lr * (gamma**i) for i in range(len(boundaries) + 1)
      ]
      super(Piecewise, self).__init__(
          boundaries=boundaries, values=lr_values
      )
  
      self.update_specified = False
  
imports: import sys
  import math
  from paddle.optimizer.lr import LinearWarmup
  from paddle.optimizer.lr import PiecewiseDecay
  from paddle.optimizer.lr import CosineAnnealingDecay
  from paddle.optimizer.lr import ExponentialDecay
  import paddle
  import paddle.regularizer
  from copy import deepcopy
label_desc: Use image node_id 1 to create a new Piecewise object from inherited base classes: PiecewiseDecay with example: obj = Piecewise(lr, step_each_epoch, decay_epochs, gamma)