    def reverse(self, model):
        """
        Load the model parameters from EMA model.
        Useful for inference or fine-tuning from the EMA model.
        """
        d = self.model.state_dict()
        if "_ema" in d:
            del d["_ema"]

        model.load_state_dict(d, strict=False)
        return model
Load the model parameters from EMA model.
Useful for inference or fine-tuning from the EMA model.
fairseq/modules/ema_module.py