diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index f72805f083a5c65bd99c68e0cea5dd1de2bc13a1..272cb32bdb59082abce638d7fb5ac96abc449fa0 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -399,7 +399,8 @@ class Trainer(object): def load_weights_sde(self, det_weights, reid_weights): if self.model.detector: load_weight(self.model.detector, det_weights) - load_weight(self.model.reid, reid_weights) + if self.model.reid: + load_weight(self.model.reid, reid_weights) else: load_weight(self.model.reid, reid_weights)