def swap_ema(self):
            """ substitute exponential moving average values into parameter values """
            for group in self.param_groups:
                for p in group['params']:
                    data = p.data
                    state = self.state[p]
                    p.data = state['ema']
                    state['ema'] = data
 substitute exponential moving average values into parameter values 
analyze/convnexts4nd/src/utils/optim/ema.py