def before_train_iter(self, runner):
        """Evaluate the model only at the start of training by iteration."""
        if self.by_epoch or not self.initial_flag:
            return
        if self.start is not None and runner.iter >= self.start:
            self.after_train_iter(runner)
        self.initial_flag = False
Evaluate the model only at the start of training by iteration.
ControlNet-v1-1-nightly/annotator/uniformer/mmcv/runner/hooks/evaluation.py