class_docstr: Learning rate schedule: lr / sqrt(max(t, warmup_steps)).
  
  This is the schedule used by Vaswani et al. in the Transformer paper
  (https://arxiv.org/pdf/1706.03762.pdf)
class_docstr_tok: ["Learning","rate","schedule",":","lr","\/","sqrt","(","max","(","t",",","warmup_steps",")",")",".","This","is","the","schedule","used","by","Vaswani","et","al",".","in","the","Transformer","paper","(","https",":","\/\/arxiv.org\/pdf\/1706.03762.pdf",")"]
code: def get_lr(self):
      # Warmup
      warm_lr = self._warmup(self._t)
      # Avoid square root of zero
      warmup_steps = max(1, self.warmup)
      # Warmup first N steps, then decay
      lr = warm_lr / sqrt(max(self._t, warmup_steps))
      return [lr for _ in self.optimizer.param_groups]
  
imports: import logging
  from math import sqrt
  from typing import Any, Dict, List, Optional, Tuple, Type
  import torch
  import sockeye.constants
  from sockeye.utils import check_condition
label_desc: Use image node_id 1 for calling the LearningRateSchedulerInvSqrtDecay obj's underlying member method code with example usage: obj.get_lr() and returns: unknown