def zero_grad(self):
        """
        Clears the gradients of all optimized parameters.
        """
        self.optimizer.zero_grad()
        self._grads_are_scaled = False

        Clears the gradients of all optimized parameters.
        
EVA-CLIP-18B/shinji/training/fp16.py