diff --git a/ppcls/engine/engine.py b/ppcls/engine/engine.py index af6c55835d347ee6fb3104564c5aa07361d0bd6d..a7138b8229e26f450a9d8d13f69e34d2e46da589 100755 --- a/ppcls/engine/engine.py +++ b/ppcls/engine/engine.py @@ -144,22 +144,21 @@ class Engine(object): self.config["Global"]["eval_during_train"]): if self.eval_mode in ["classification", "adaface"]: self.eval_dataloader = build_dataloader( - self.config["DataLoader"], "Eval", self.device, - self.use_dali) + self.config["DataLoader"], "Eval", self.device, False) elif self.eval_mode == "retrieval": self.gallery_query_dataloader = None if len(self.config["DataLoader"]["Eval"].keys()) == 1: key = list(self.config["DataLoader"]["Eval"].keys())[0] self.gallery_query_dataloader = build_dataloader( self.config["DataLoader"]["Eval"], key, self.device, - self.use_dali) + False) else: self.gallery_dataloader = build_dataloader( self.config["DataLoader"]["Eval"], "Gallery", - self.device, self.use_dali) + self.device, False) self.query_dataloader = build_dataloader( self.config["DataLoader"]["Eval"], "Query", - self.device, self.use_dali) + self.device, False) # build loss if self.mode == "train": @@ -339,11 +338,11 @@ class Engine(object): ) self.config["Global"]["seed"] = seed = 42 logger.info( - f"Set random seed to ({seed} + $PADDLE_TRAINER_ID) for different trainer" + f"Set random seed to ({int(seed)} + $PADDLE_TRAINER_ID) for different trainer" ) - paddle.seed(seed + dist.get_rank()) - np.random.seed(seed + dist.get_rank()) - random.seed(seed + dist.get_rank()) + paddle.seed(int(seed) + dist.get_rank()) + np.random.seed(int(seed) + dist.get_rank()) + random.seed(int(seed) + dist.get_rank()) # build postprocess for infer if self.mode == 'infer':