def METHOD_NAME(self):
    for group in self.param_groups:
        for p in group['params']:
            if 'e_w' not in self.state[p]:
                continue
            e_w = self.state[p]['e_w']  # retrieve stale e(w)
            p.sub_(e_w)  # get back to "w" from "w + e(w)"