From c61c68d4cc4d38ba0d966c8cd96b1c2896b11263 Mon Sep 17 00:00:00 2001 From: LokeZhou Date: Sat, 28 Jan 2023 19:51:16 +0800 Subject: [PATCH] fix trainer.py load_weights_sde when reid mode is None (#7604) * fix trainer.py load_weights_sde when reid mode is None * fix trainer.py load_weights_sde --- ppdet/engine/trainer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index f72805f08..272cb32bd 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) -- GitLab