def before_val_epoch(self, runner) -> None:
        """We load parameter values from ema model to source model before
        validation.

        Args:
            runner (Runner): The runner of the training process.
        """
        if self.evaluate_on_ema:
            # Swap when evaluate on ema
            self._swap_ema_parameters()
We load parameter values from ema model to source model before
        validation.

        Args:
            runner (Runner): The runner of the training process.
        
mmpretrain/engine/hooks/ema_hook.py