keras/src/optimizers/base_optimizer.py/BaseOptimizer/_backend_reset_gradient_accumulators
class BaseOptimizer:    def _backend_reset_gradient_accumulators(self):
        for g_acc in self._accumulated_gradients:
            g_acc.assign(ops.zeros(g_acc.shape, dtype=g_acc.dtype))