class_docstr: Base optimizer class for the fastai library, updating `params` with `cbs`
class_docstr_tok: ["Base","optimizer","class","for","the","fastai","library",",","updating","`","params","`","with","`","cbs","`"]
code: def load_state_dict(
      self,
      sd: dict,  # State dict with `hypers` and `state` to load on the optimizer
  ):
      assert len(sd["hypers"]) == len(self.param_lists)
      assert len(sd["state"]) == sum(
          [len(pg) for pg in self.param_lists]
      )
      self.hypers = sd["hypers"]
      self.state = {
          p: s
          for p, s in zip(self.all_params().itemgot(0), sd["state"])
      }
  
imports: from __future__ import annotations
  from .torch_basics import *
label_desc: Use image node_id 6 for calling the Optimizer obj's underlying member method code with example usage: obj.load_state_dict(sd) without return types