class_docstr: Linear warmup and then cosine decay.
  Linearly increases learning rate from 0 to 1 over `warmup_steps` training steps.
  Decreases learning rate from 1. to 0. over remaining `t_total - warmup_steps` steps
  following a cosine curve.
  If `cycles` (default=0.5) is different from default, learning rate follows
  cosine function after warmup.
class_docstr_tok: ["Linear","warmup","and","then","cosine","decay",".","Linearly","increases","learning","rate","from","0","to","1","over","`","warmup_steps","`","training","steps",".","Decreases","learning","rate","from","1.","to","0.","over","remaining","`","t_total","-","warmup_steps","`","steps","following","a","cosine","curve",".","If","`","cycles","`","(","default=0.5",")","is","different","from","default",",","learning","rate","follows","cosine","function","after","warmup","."]
code: def lr_lambda(self, step):
      if step < self.warmup_steps:
          return float(step) / float(max(1.0, self.warmup_steps))
      # progress after warmup
      progress = float(step - self.warmup_steps) / float(
          max(1, self.t_total - self.warmup_steps)
      )
      return max(
          0.0,
          0.5
          * (
              1.0
              + math.cos(math.pi * float(self.cycles) * 2.0 * progress)
          ),
      )
  
file_path: graph4nlp/examples/pytorch/nmt/utils.py
imports: import logging
  import math
  import os
  import pickle
  import torch
  import torchtext.vocab
  from torch.optim.lr_scheduler import LambdaLR
  from graph4nlp.pytorch.modules.utils.vocab_utils import Vocab
label_desc: Use image node_id 2 for calling the WarmupCosineSchedule obj's underlying member method code with example usage: obj.lr_lambda(step) and returns: max, unknown