def zero_grad(self):
        """
        Clears the gradients of all parameters.
        """
        for p in self.parameters:
            p.gradients = set()

        Clears the gradients of all parameters.
        
textgrad/optimizer/optimizer.py