class_docstr: One Cycle learning rate decay
  A learning rate which can be referred in https://arxiv.org/abs/1708.07120
  Code refered in https://pytorch.org/docs/stable/_modules/torch/optim/lr_scheduler.html#OneCycleLR
class_docstr_tok: ["One","Cycle","learning","rate","decay","A","learning","rate","which","can","be","referred","in","https",":","\/\/arxiv.org\/abs\/1708.07120","Code","refered","in","https",":","\/\/pytorch.org\/docs\/stable\/_modules\/torch\/optim\/lr_scheduler.html","#","OneCycleLR"]
code: def get_lr(self):
      computed_lr = 0.0
      step_num = self.last_epoch
  
      if step_num > self.total_steps:
          raise ValueError(
              "Tried to step {} times. The specified number of total steps is {}".format(
                  step_num + 1, self.total_steps
              )
          )
      start_step = 0
      for i, phase in enumerate(self._schedule_phases):
          end_step = phase["end_step"]
          if (
              step_num <= end_step
              or i == len(self._schedule_phases) - 1
          ):
              pct = (step_num - start_step) / (end_step - start_step)
              computed_lr = self.anneal_func(
                  phase["start_lr"], phase["end_lr"], pct
              )
              break
          start_step = phase["end_step"]
  
      return computed_lr
  
file_path: PaddleOCR/ppocr/optimizer/lr_scheduler.py
imports: import math
  from paddle.optimizer.lr import LRScheduler
label_desc: Use image node_id 4 for calling the OneCycleDecay obj's underlying member method code with example usage: obj.get_lr() and returns: computed_lr