def __init__(self, model=None, decay=0.9996):
        """
        Args:
            model (nn.Module): model to apply EMA.
            decay (float): ema decay reate.
        """
        self.model = deepcopy(model)
        self.decay = decay

        Args:
            model (nn.Module): model to apply EMA.
            decay (float): ema decay reate.
        
ppdet/optimizer/ema.py