def after_train_iter(self,
                         runner,
                         batch_idx: int,
                         data_batch: DATA_BATCH = None,
                         outputs: Optional[dict] = None) -> None:
        """Calculate prcise BN and broadcast BN stats across GPUs.

        Args:
            runner (obj:`Runner`): The runner of the training process.
            batch_idx (int): The index of the current batch in the train loop.
            data_batch (Sequence[dict], optional): Data from dataloader.
                Defaults to None.
        """
        # if use `IterBasedTrainLoop``, do perform precise every
        # `self.interval` iters.
        if isinstance(runner.train_loop,
                      IterBasedTrainLoop) and self.every_n_train_iters(
                          runner, self.interval):
            self._perform_precise_bn(runner)
Calculate prcise BN and broadcast BN stats across GPUs.

        Args:
            runner (obj:`Runner`): The runner of the training process.
            batch_idx (int): The index of the current batch in the train loop.
            data_batch (Sequence[dict], optional): Data from dataloader.
                Defaults to None.
        
mmpretrain/engine/hooks/precise_bn_hook.py