diff --git a/mmrazor/models/algorithms/distill/configurable/single_teacher_distill.py b/mmrazor/models/algorithms/distill/configurable/single_teacher_distill.py index 44a8a3438..d921aa628 100644 --- a/mmrazor/models/algorithms/distill/configurable/single_teacher_distill.py +++ b/mmrazor/models/algorithms/distill/configurable/single_teacher_distill.py @@ -56,9 +56,9 @@ def __init__(self, f'{type(teacher)}') self.teacher = teacher + self.teacher.init_weights() if teacher_ckpt: # avoid loaded parameters be overwritten - self.teacher.init_weights() _ = load_checkpoint(self.teacher, teacher_ckpt) self.teacher_trainable = teacher_trainable if not self.teacher_trainable: