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 clear_state(self):
      for p, pg, state, hyper in self.all_params():
          self.state[p] = {
              k: state[k] for k in self._keep_on_clear if k in state
          }
  
imports: from __future__ import annotations
  from .torch_basics import *
label_desc: Use image node_id 4 for calling the Optimizer obj's underlying member method code with example usage: obj.clear_state() without return types