class_docstr: ## Adam Optimizer
  
  We extend the class `GenericAdaptiveOptimizer` defined in [`__init__.py`](index.html)
  to implement the Adam optimizer.
docstr: ### Get learning-rate
  
  This returns the modified learning rate based on the state.
  For *Adam* this is just the specified learning rate for the parameter group,
  $lpha$.
docstr_tok: ["#","#","#","Get","learning-rate","This","returns","the","modified","learning","rate","based","on","the","state",".","For","*","Adam","*","this","is","just","the","specified","learning","rate","for","the","parameter","group",",","$","\u0007lpha","$","."]
code: def get_lr(self, state: Dict[str, any], group: Dict[str, any]):
      """
      ### Get learning-rate
  
      This returns the modified learning rate based on the state.
      For *Adam* this is just the specified learning rate for the parameter group,
      $\alpha$.
      """
      return group["lr"]
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/optimizers/adam.py
imports: import math
  from typing import Dict, Any, Tuple, Optional
  import torch
  from labml import tracker
  from torch import nn
  from labml_nn.optimizers import GenericAdaptiveOptimizer, WeightDecay
label_desc: Use image node_id 4 for calling the Adam obj's underlying member method code with example usage: obj.get_lr(state, group) and returns: group