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 zero_grad(self):
      for p, *_ in self.all_params(with_grad=True):
          p.grad.detach_()
          p.grad.zero_()
  
imports: from __future__ import annotations
  from .torch_basics import *
label_desc: Use image node_id 2 for calling the Optimizer obj's underlying member method code with example usage: obj.zero_grad() without return types