class_docstr: Decay the LR on a fixed schedule.
class_docstr_tok: ["Decay","the","LR","on","a","fixed","schedule","."]
docstr: Update the learning rate after each update.
docstr_tok: ["Update","the","learning","rate","after","each","update","."]
code: def step_update(self, num_updates):
      """Update the learning rate after each update."""
      if (
          self.cfg.warmup_updates > 0
          and num_updates < self.cfg.warmup_updates
      ):
          self.warmup_factor = (num_updates + 1) / float(
              self.cfg.warmup_updates
          )
          self.optimizer.set_lr(self.warmup_factor * self.lr)
      else:
          self.optimizer.set_lr(self.lr)
      return self.optimizer.get_lr()
  
file_path: fairseq/fairseq/optim/lr_scheduler/fixed_schedule.py
imports: from dataclasses import dataclass, field
  from typing import Optional, List
  from omegaconf import II
  from fairseq.dataclass import FairseqDataclass
  from fairseq.optim.lr_scheduler import FairseqLRScheduler, register_lr_scheduler
label_desc: Use image node_id 6 for calling the FixedLRSchedule obj's underlying member method code with example usage: obj.step_update(num_updates) and returns: self