class_docstr: :class:`~opacus.optimizers.optimizer.DPOptimizer` that implements
  adaptive clipping strategy
  https://arxiv.org/pdf/1905.03871.pdf
class_docstr_tok: [":","class",":","`","~opacus.optimizers.optimizer.DPOptimizer","`","that","implements","adaptive","clipping","strategy","https",":","\/\/arxiv.org\/pdf\/1905.03871.pdf"]
docstr: Clear gradients, self.sample_size and self.unclipped_num
docstr_tok: ["Clear","gradients",",","self.sample_size","and","self.unclipped_num"]
code: def zero_grad(self, set_to_none: bool = False):
      """
      Clear gradients, self.sample_size and self.unclipped_num
      """
      super().zero_grad(set_to_none)
  
      self.sample_size = 0
      self.unclipped_num = 0
  
file_path: opacus/opacus/optimizers/adaclipoptimizer.py
imports: from __future__ import annotations
  import logging
  from typing import Callable, Optional
  import torch
  from opt_einsum import contract
  from torch.optim import Optimizer
  from .optimizer import DPOptimizer, _check_processed_flag, _generate_noise, _mark_as_processed
label_desc: Use image node_id 2 for calling the AdaClipDPOptimizer obj's underlying member method code with example usage: obj.zero_grad(set_to_none) without return types