def METHOD_NAME(self):
    """Performs reset to all the states of the AdamTF optimizer, including
    exponential moving average of gradients and squared gradients etc.
    """
    for group in self.param_groups:
        amsgrad = group['amsgrad']
        for p in group['params']:
            state = self.state[p]
            state['step'] = 0
            # Exponential moving average of gradient values
            state['exp_avg'] = torch.zeros_like(
                p, memory_format=torch.preserve_format)
            # Exponential moving average of squared gradient values
            state['exp_avg_sq'] = torch.zeros_like(
                p, memory_format=torch.preserve_format)
            if amsgrad:
                # Maintains max of all exp. moving avg. of sq. grad. values
                state['max_exp_avg_sq'] = torch.zeros_like(
                    p, memory_format=torch.preserve_format)